test: cli: add information about which test failed

Signed-off-by: Aleksa Sarai <asarai@suse.de>
This commit is contained in:
Aleksa Sarai 2017-01-14 18:00:59 +11:00
parent f9adee80f4
commit 3c76a35588
No known key found for this signature in database
GPG key ID: 9E18AA267DDB8DB4

View file

@ -17,10 +17,11 @@ func main() {
cmd.Stdout = os.Stdout
if err := cmd.Run(); err != nil {
failed++
fmt.Fprintf(os.Stderr, "FAILED: %s\n", arg)
}
}
if failed > 0 {
fmt.Printf("%d FAILED tests\n", failed)
fmt.Fprintf(os.Stderr, "%d FAILED tests\n", failed)
os.Exit(1)
}
}