diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2015-10-20 10:40:26 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2015-10-20 15:46:04 +0200 |
| commit | 505473bd9be2eefb9e1ab0291da91ae2e40f9ed1 (patch) | |
| tree | 5b3297cc326e41b6461949ee9c617f336033f8ca /tools/execprog/execprog.go | |
| parent | 74f5340ea65df34599f489dcff2e9a881a03a50b (diff) | |
allow to specify timeout in execprog
Diffstat (limited to 'tools/execprog/execprog.go')
| -rw-r--r-- | tools/execprog/execprog.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/execprog/execprog.go b/tools/execprog/execprog.go index bd8ebe3f9..d4ff9fffd 100644 --- a/tools/execprog/execprog.go +++ b/tools/execprog/execprog.go @@ -27,6 +27,7 @@ var ( flagStrace = flag.Bool("strace", false, "run executor under strace") flagCover = flag.String("cover", "", "collect coverage and write to the file") flagDedup = flag.Bool("dedup", false, "deduplicate coverage in executor") + flagTimeout = flag.Duration("timeout", 5*time.Second, "execution timeout") ) func main() { @@ -57,7 +58,7 @@ func main() { if *flagDedup { flags |= ipc.FlagDedupCover } - env, err := ipc.MakeEnv(*flagExecutor, 3*time.Second, flags) + env, err := ipc.MakeEnv(*flagExecutor, *flagTimeout, flags) if err != nil { fmt.Fprintf(os.Stderr, "failed to create execution environment: %v\n", err) os.Exit(1) |
