aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/runtest/run.go8
-rw-r--r--pkg/runtest/run_test.go1
2 files changed, 8 insertions, 1 deletions
diff --git a/pkg/runtest/run.go b/pkg/runtest/run.go
index 0e9c31a98..0af03158e 100644
--- a/pkg/runtest/run.go
+++ b/pkg/runtest/run.go
@@ -56,6 +56,7 @@ type Context struct {
EnabledCalls map[string]map[*prog.Syscall]bool
Requests chan *RunRequest
LogFunc func(text string)
+ Verbose bool
}
func (ctx *Context) log(msg string, args ...interface{}) {
@@ -77,12 +78,15 @@ func (ctx *Context) Run() error {
os.Remove(req.Bin)
}
result := ""
+ verbose := false
if req.broken != "" {
broken++
result = fmt.Sprintf("BROKEN (%v)", req.broken)
+ verbose = true
} else if req.skip != "" {
skip++
result = fmt.Sprintf("SKIP (%v)", req.skip)
+ verbose = true
} else {
if req.Err == nil {
req.Err = checkResult(req)
@@ -100,7 +104,9 @@ func (ctx *Context) Run() error {
result = "OK"
}
}
- ctx.log("%-38v: %v", req.name, result)
+ if !verbose || ctx.Verbose {
+ ctx.log("%-38v: %v", req.name, result)
+ }
}
if err := <-errc; err != nil {
return err
diff --git a/pkg/runtest/run_test.go b/pkg/runtest/run_test.go
index 21ca38b83..5cbf2b831 100644
--- a/pkg/runtest/run_test.go
+++ b/pkg/runtest/run_test.go
@@ -73,6 +73,7 @@ func test(t *testing.T, sysTarget *targets.Target) {
t.Helper()
t.Logf(text)
},
+ Verbose: true,
}
if err := ctx.Run(); err != nil {
t.Fatal(err)