mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
repeat.v: support --max_time limit for the average time of a command
This commit is contained in:
parent
6d1f85a04b
commit
0edcd5efb0
3 changed files with 30 additions and 11 deletions
|
@ -61,6 +61,16 @@ pub fn rmrf(path string) {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn exec(cmd string) ?os.Result {
|
||||
verbose_trace(@FN, cmd)
|
||||
x := os.exec(cmd) or {
|
||||
verbose_trace(@FN, '## failed.')
|
||||
return error(err)
|
||||
}
|
||||
verbose_trace_exec_result(x)
|
||||
return x
|
||||
}
|
||||
|
||||
pub fn run(cmd string) string {
|
||||
verbose_trace(@FN, cmd)
|
||||
x := os.exec(cmd) or {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue