Browse Source

Make core:net test os.exit(1) on failure.

Jeroen van Rijn 1 year ago
parent
commit
81fe93127d
1 changed files with 5 additions and 0 deletions
  1. 5 0
      tests/core/net/test_core_net.odin

+ 5 - 0
tests/core/net/test_core_net.odin

@@ -17,6 +17,7 @@ import "core:net"
 import "core:strconv"
 import "core:strconv"
 import "core:time"
 import "core:time"
 import "core:thread"
 import "core:thread"
+import "core:os"
 
 
 _, _ :: time, thread
 _, _ :: time, thread
 
 
@@ -73,6 +74,10 @@ main :: proc() {
 	fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
 	fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
 
 
 	print_tracking_allocator_report()
 	print_tracking_allocator_report()
+
+	if TEST_fail > 0 {
+		os.exit(1)
+	}
 }
 }
 
 
 @test
 @test