mirror of
https://github.com/reactos/syzkaller.git
synced 2024-10-07 09:03:28 +00:00
pkg/runtest: allow to select a subset of tests to run
This commit is contained in:
parent
e2f6c0c1b5
commit
6b24f02a11
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user