2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-22 19:08:55 +00:00

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

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)
}
}