Skip to content

Commit 65b9545

Browse files
committed
test: fix nasty 'go test' exit code 0 on failing tests :/
Signed-off-by: Alexander Bezzubov <[email protected]>
1 parent 5fbadc8 commit 65b9545

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

benchmark_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ var (
2828
)
2929

3030
func TestMain(m *testing.M) {
31-
var exitCode int
32-
defer os.Exit(exitCode)
33-
3431
flag.BoolVar(&slow, "slow", false, "run benchmarks per sample for strategies too")
3532
flag.Parse()
3633

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

50-
exitCode = m.Run()
47+
os.Exit(m.Run())
5148
}
5249

5350
func cloneLinguist(linguistURL string) error {

0 commit comments

Comments
 (0)