Add error checking for CI tests

This commit is contained in:
Alexander Neumann 2016-04-17 18:47:00 +02:00
parent b2846ea49d
commit baece5eeb3
1 changed files with 6 additions and 0 deletions

View File

@ -468,10 +468,16 @@ func main() {
os.Exit(1)
}
foundError := false
for _, f := range []func() error{env.Prepare, env.RunTests, env.Teardown} {
err := f()
if err != nil {
foundError = true
fmt.Fprintf(os.Stderr, "error: %v\n", err)
}
}
if foundError {
os.Exit(1)
}
}