mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-27 23:41:31 +00:00
In the middle of porting core:testing
This commit is contained in:
@@ -20,7 +20,7 @@ import "core:io"
|
||||
@require import "core:log"
|
||||
import "core:math/rand"
|
||||
import "core:mem"
|
||||
import "core:os"
|
||||
import os "core:os/os2"
|
||||
import "core:slice"
|
||||
@require import "core:strings"
|
||||
import "core:sync/chan"
|
||||
@@ -216,8 +216,8 @@ runner :: proc(internal_tests: []Internal_Test) -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
stdout := io.to_writer(os.stream_from_handle(os.stdout))
|
||||
stderr := io.to_writer(os.stream_from_handle(os.stderr))
|
||||
stdout := os.stdout.stream
|
||||
stderr := os.stderr.stream
|
||||
|
||||
// The animations are only ever shown through STDOUT;
|
||||
// STDERR is used exclusively for logging regardless of error level.
|
||||
@@ -314,7 +314,7 @@ runner :: proc(internal_tests: []Internal_Test) -> bool {
|
||||
// -- Set thread count.
|
||||
|
||||
when TEST_THREADS == 0 {
|
||||
thread_count := os.processor_core_count()
|
||||
thread_count := os.get_processor_core_count()
|
||||
} else {
|
||||
thread_count := max(1, TEST_THREADS)
|
||||
}
|
||||
|
||||
@@ -10,11 +10,11 @@ package testing
|
||||
Feoramund: Total rewrite.
|
||||
*/
|
||||
|
||||
import "base:intrinsics"
|
||||
import "core:c/libc"
|
||||
import "core:os"
|
||||
import "core:sync"
|
||||
import "core:terminal/ansi"
|
||||
import "base:intrinsics"
|
||||
import "core:c/libc"
|
||||
import os "core:os/os2"
|
||||
import "core:sync"
|
||||
import "core:terminal/ansi"
|
||||
|
||||
@(private="file") stop_runner_flag: libc.sig_atomic_t
|
||||
|
||||
|
||||
Reference in New Issue
Block a user