Skip to content

Commit

Permalink
test: fix nasty 'go test' exit code 0 on failing tests :/
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
  • Loading branch information
bzz committed Jan 29, 2019
1 parent 34625ab commit 2348fd2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -47,7 +44,7 @@ func TestMain(m *testing.M) {
log.Fatal(err)
}

exitCode = m.Run()
os.Exit(m.Run())
}

func cloneLinguist(linguistURL string) error {
Expand Down

0 comments on commit 2348fd2

Please sign in to comment.