[tests] Make test runners exit with errorlevel 1 if a test fails.

This commit is contained in:
Jeroen van Rijn
2022-03-03 15:16:16 +01:00
parent 8af08f2153
commit 6d9f84ba03
10 changed files with 38 additions and 1 deletions
+4
View File
@@ -5,6 +5,7 @@ import "core:hash"
import "core:time"
import "core:testing"
import "core:fmt"
import "core:os"
TEST_count := 0
TEST_fail := 0
@@ -35,6 +36,9 @@ main :: proc() {
test_xxhash_vectors(&t)
test_crc64_vectors(&t)
fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
if TEST_fail > 0 {
os.exit(1)
}
}
/*