aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/runtest/run_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/runtest/run_test.go b/pkg/runtest/run_test.go
index ede757ee8..d9fdadfab 100644
--- a/pkg/runtest/run_test.go
+++ b/pkg/runtest/run_test.go
@@ -4,6 +4,7 @@
package runtest
import (
+ "flag"
"os"
"path/filepath"
"runtime"
@@ -16,6 +17,11 @@ import (
_ "github.com/google/syzkaller/sys/test/gen" // pull in the test target
)
+// Can be used as:
+// go test -v -run=Test/64_fork ./pkg/runtest -filter=nonfailing
+// to select a subset of tests to run.
+var flagFilter = flag.String("filter", "", "prefix to match test file names")
+
func Test(t *testing.T) {
switch runtime.GOOS {
case "openbsd":
@@ -74,6 +80,7 @@ func test(t *testing.T, sysTarget *targets.Target) {
ctx := &Context{
Dir: filepath.Join("..", "..", "sys", target.OS, "test"),
Target: target,
+ Tests: *flagFilter,
Features: features,
EnabledCalls: enabledCalls,
Requests: requests,