aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2019-09-05 19:40:50 +0200
committerAndrey Konovalov <andreyknvl@gmail.com>2019-09-17 15:58:29 +0200
commitd62be7809cc2ee034ae2d22665d79cb13a910582 (patch)
treee4e6e200ced04d43ae9609cf2e847a902ee6b027 /tools
parentd555ee7ed18477ef796885f2988f9185f02f666c (diff)
runtest: add a flag to specify tests to run
Diffstat (limited to 'tools')
-rw-r--r--tools/syz-runtest/runtest.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/syz-runtest/runtest.go b/tools/syz-runtest/runtest.go
index 61b89a809..538646a2b 100644
--- a/tools/syz-runtest/runtest.go
+++ b/tools/syz-runtest/runtest.go
@@ -33,6 +33,7 @@ import (
var (
flagConfig = flag.String("config", "", "manager config")
flagDebug = flag.Bool("debug", false, "debug mode")
+ flagTests = flag.String("tests", "", "prefix to match test file names")
)
func main() {
@@ -123,6 +124,7 @@ func main() {
Requests: mgr.requests,
LogFunc: func(text string) { fmt.Println(text) },
Verbose: false,
+ Tests: *flagTests,
}
err = ctx.Run()
close(vm.Shutdown)
@@ -287,6 +289,9 @@ func testParsing(target *prog.Target, dir string) error {
if strings.HasSuffix(file.Name(), ".swp") {
continue
}
+ if !strings.HasPrefix(file.Name(), *flagTests) {
+ continue
+ }
if err := runtest.TestParseProg(target, dir, file.Name()); err != nil {
return err
}