aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/runtest/run.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-11-15 11:48:02 +0100
committerDmitry Vyukov <dvyukov@google.com>2019-11-16 09:58:54 +0100
commit8825ff8ff2a5890d34a6830231f0f59287c8fa05 (patch)
tree6d971201863f0a9224cd044dd818531d004d3aa6 /pkg/runtest/run.go
parent587cec15e23ecafc9b00f8ae775a98d0e4803997 (diff)
pkg/runtest: shrink if condition
Diffstat (limited to 'pkg/runtest/run.go')
-rw-r--r--pkg/runtest/run.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/pkg/runtest/run.go b/pkg/runtest/run.go
index 2c3970990..2b0fb982e 100644
--- a/pkg/runtest/run.go
+++ b/pkg/runtest/run.go
@@ -167,13 +167,9 @@ func (ctx *Context) generatePrograms(progs chan *RunRequest) error {
sort.Strings(sandboxes)
sysTarget := targets.Get(ctx.Target.OS, ctx.Target.Arch)
for _, file := range files {
- if strings.HasSuffix(file.Name(), "~") {
- continue
- }
- if strings.HasSuffix(file.Name(), ".swp") {
- continue
- }
- if !strings.HasPrefix(file.Name(), ctx.Tests) {
+ if strings.HasSuffix(file.Name(), "~") ||
+ strings.HasSuffix(file.Name(), ".swp") ||
+ !strings.HasPrefix(file.Name(), ctx.Tests) {
continue
}
p, requires, results, err := ctx.parseProg(file.Name())