Skip to content
Permalink
Browse files

integration tests: parse exit status

  • Loading branch information...
bradfitz committed Aug 7, 2018
1 parent 73629a1 commit 9809d7ef6a00697aa6f27791aa6b0970741e4694
Showing with 14 additions and 3 deletions.
  1. +14 −3 integration_test.go
@@ -184,10 +184,21 @@ func TestInQemu(t *testing.T) {
"-initrd", initrdPath,
"-no-reboot",
"-append", "console=ttyS0,115200 panic=-1 acpi=off nosmp ip=dhcp parentTempDir="+td)
cmd.Stdout = os.Stderr
cmd.Stderr = os.Stderr
var out bytes.Buffer
var std io.Writer = &out
const verbose = true
if verbose {
std = io.MultiWriter(std, os.Stderr)
}
cmd.Stdout = std
cmd.Stderr = std
err = cmd.Run()
t.Logf("Run = %v", err)
if err != nil {
t.Fatalf("run: %v", err)
}
if !bytes.Contains(out.Bytes(), []byte("\n:: exit=0")) {
t.Error("non-zero exit status")
}
}

type monClient struct {

0 comments on commit 9809d7e

Please sign in to comment.
You can’t perform that action at this time.