diff options
| -rw-r--r-- | cmd/hakurei/testsuite/sandbox/main.go | 2 | ||||
| -rw-r--r-- | internal/testsuite/testsuite.go | 13 |
2 files changed, 10 insertions, 5 deletions
diff --git a/cmd/hakurei/testsuite/sandbox/main.go b/cmd/hakurei/testsuite/sandbox/main.go index ac0cf760..a85ec485 100644 --- a/cmd/hakurei/testsuite/sandbox/main.go +++ b/cmd/hakurei/testsuite/sandbox/main.go @@ -293,7 +293,7 @@ func main() { if err != nil { log.Fatalf("test case %s: %v", name, err) } - }, true, &tc.Hakurei, + }, true, false, &tc.Hakurei, ) testsuite.MustCheckFilter( diff --git a/internal/testsuite/testsuite.go b/internal/testsuite/testsuite.go index d1f3d933..fee4952c 100644 --- a/internal/testsuite/testsuite.go +++ b/internal/testsuite/testsuite.go @@ -478,16 +478,21 @@ func StartHakurei( dbusEnv string, processCommand func(cmd *exec.Cmd), onDone func(err error, output string), - scan, wait bool, + scan, wait, verbose bool, c *hst.Config, ) (p hst.State, pid int, err error) { s := store.New(check.MustAbs("/tmp/hakurei.0/state")) + hakureiFlags := "" + if verbose { + hakureiFlags += " -v" + } + cmd := exec.CommandContext(ctx, "script", "/dev/null", "-E", "always", "-qec", - "hakurei run "+ + "hakurei"+hakureiFlags+" run "+ "--identifier-fd=5"+ " 4 1>&3", ) @@ -653,7 +658,7 @@ func MustStartHakurei( cred *syscall.Credential, dbusEnv string, onDone func(err error, output string), - wait bool, + wait, verbose bool, c *hst.Config, ) (p hst.State, pid int) { _ctx, cancel := context.WithCancel(ctx) @@ -664,7 +669,7 @@ func MustStartHakurei( nil, func(err error, output string) { defer cancel() onDone(err, output) - }, true, wait, c, + }, true, wait, verbose, c, ) if err != nil { log.Printf("cannot start hakurei container: %v", err) |
