aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
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 /pkg
parentd555ee7ed18477ef796885f2988f9185f02f666c (diff)
runtest: add a flag to specify tests to run
Diffstat (limited to 'pkg')
-rw-r--r--pkg/runtest/run.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/runtest/run.go b/pkg/runtest/run.go
index 46a3f09cb..e380ad490 100644
--- a/pkg/runtest/run.go
+++ b/pkg/runtest/run.go
@@ -59,6 +59,7 @@ type Context struct {
LogFunc func(text string)
Retries int // max number of test retries to deal with flaky tests
Verbose bool
+ Tests string // prefix to match test file names
}
func (ctx *Context) log(msg string, args ...interface{}) {
@@ -172,6 +173,9 @@ func (ctx *Context) generatePrograms(progs chan *RunRequest) error {
if strings.HasSuffix(file.Name(), ".swp") {
continue
}
+ if !strings.HasPrefix(file.Name(), ctx.Tests) {
+ continue
+ }
p, requires, results, err := ctx.parseProg(file.Name())
if err != nil {
return err