From 2348fd2e37e459615532c6a9d9264ea9cff8a00b Mon Sep 17 00:00:00 2001 From: Alexander Bezzubov Date: Tue, 29 Jan 2019 14:36:56 +0100 Subject: [PATCH] test: fix nasty 'go test' exit code 0 on failing tests :/ Signed-off-by: Alexander Bezzubov --- benchmark_test.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/benchmark_test.go b/benchmark_test.go index cdc91078..afded28d 100644 --- a/benchmark_test.go +++ b/benchmark_test.go @@ -28,9 +28,6 @@ var ( ) func TestMain(m *testing.M) { - var exitCode int - defer os.Exit(exitCode) - flag.BoolVar(&slow, "slow", false, "run benchmarks per sample for strategies too") flag.Parse() @@ -47,7 +44,7 @@ func TestMain(m *testing.M) { log.Fatal(err) } - exitCode = m.Run() + os.Exit(m.Run()) } func cloneLinguist(linguistURL string) error {