diff --git a/mantle/cmd/kola/testiso.go b/mantle/cmd/kola/testiso.go index 1b72195083..48d90a4e7f 100644 --- a/mantle/cmd/kola/testiso.go +++ b/mantle/cmd/kola/testiso.go @@ -694,8 +694,7 @@ func awaitCompletion(ctx context.Context, inst *platform.QemuInstance, outdir st if err != nil { errchan <- err } - }() - } + } go func() { err := inst.Wait() // only one Wait() gets process data, so also manually check for signal diff --git a/mantle/kola/harness.go b/mantle/kola/harness.go index c351313ee1..140e79823b 100644 --- a/mantle/kola/harness.go +++ b/mantle/kola/harness.go @@ -1919,15 +1919,14 @@ func ScpKolet(machines []platform.Machine) error { // CheckConsoleText checks console output for badness -func CheckConsoleText(consoleOutput []byte) (bool, []string) { - var badlines []string - warnOnly, allowRerunSuccess := true, true +func CheckConsoleText(badlines []string) (bool, []string) { + badness := true for _, check := range consoleChecks { if check.skipFlag != nil { continue } - match := check.match.FindSubmatch(consoleOutput) - if match != nil { + match := check.match.FindString(badlines[1]) + if match != "" { badline := check.desc if len(match) > 1 { // include first subexpression @@ -1935,14 +1934,11 @@ func CheckConsoleText(consoleOutput []byte) (bool, []string) { } badlines = append(badlines, badline) if !check.warnOnly { - warnOnly = false - } - if !check.allowRerunSuccess { - allowRerunSuccess = false + badness = false } } } - return warnOnly, badlines + return badness, badlines } // CheckConsole checks some console output for badness and returns short @@ -1972,9 +1968,8 @@ func CheckConsole(output []byte, t *register.Test) (bool, []string) { if !check.allowRerunSuccess { allowRerunSuccess = false } - cc := CheckConsoleText([]byte(output)) - fmt.Printf("Test failed: %v", cc) - fmt.Printf("// Leftovers \n\n") + is_it_err,checkConsole := CheckConsoleText([]string(badlines)) + fmt.Printf("%v\n,%v", checkConsole, is_it_err) } } if len(badlines) > 0 && allowRerunSuccess && t != nil { diff --git a/mantle/platform/qemu.go b/mantle/platform/qemu.go index 64cba8ff7f..d8239133e7 100644 --- a/mantle/platform/qemu.go +++ b/mantle/platform/qemu.go @@ -43,7 +43,6 @@ import ( "syscall" "time" - "github.com/coreos/coreos-assembler/mantle/kola" "github.com/coreos/coreos-assembler/mantle/platform/conf" "github.com/coreos/coreos-assembler/mantle/util" coreosarch "github.com/coreos/stream-metadata-go/arch"