From a1b245b4dddcdc11b766620859ce3e150213bfc5 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 29 Aug 2018 17:45:13 -0700 Subject: pkg/instance: fix job testing New FuzzerCmd generates flags that can't be parsed by an old fuzzer. Fix that and add a test. --- pkg/instance/instance.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pkg/instance/instance.go') diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go index ebcf75c40..ad0a1ba76 100644 --- a/pkg/instance/instance.go +++ b/pkg/instance/instance.go @@ -372,10 +372,14 @@ func FuzzerCmd(fuzzer, executor, name, OS, arch, fwdAddr, sandbox string, procs, // because old execprog does not have os flag. osArg = " -os=" + OS } + runtestArg := "" + if runtest { + runtestArg = " -runtest" + } return fmt.Sprintf("%v -executor=%v -name=%v -arch=%v%v -manager=%v -sandbox=%v"+ - " -procs=%v -v=%d -cover=%v -debug=%v -test=%v -runtest=%v", + " -procs=%v -v=%d -cover=%v -debug=%v -test=%v%v", fuzzer, executor, name, arch, osArg, fwdAddr, sandbox, - procs, verbosity, cover, debug, test, runtest) + procs, verbosity, cover, debug, test, runtestArg) } func ExecprogCmd(execprog, executor, OS, arch, sandbox string, repeat, threaded, collide bool, -- cgit mrf-deployment