1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

repeat.v: support --max_time limit for the average time of a command

This commit is contained in:
Delyan Angelov
2020-10-09 11:06:00 +03:00
parent 6d1f85a04b
commit 0edcd5efb0
3 changed files with 30 additions and 11 deletions

View File

@ -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 {