Feoramund
cb8faf5b74
Remove -test-name in favor of test runner option
...
`-define:ODIN_TEST_NAMES=...` is capable of selecting test by package
and name or name only, with the ability to access packages included by
`-all-packages`.
2024-06-02 14:54:32 -04:00
Feoramund
6a5d51f0d6
Use more concise way of satisfying -vet
2024-06-02 14:54:31 -04:00
Feoramund
433ca538bf
Be specific about platforms not implementing test runner signal handler
2024-06-02 14:54:31 -04:00
Feoramund
d1723664a7
Catch SIGILL, SIGFPE, SIGSEGV in the test runner
2024-06-02 14:54:31 -04:00
Feoramund
fb37572c4c
Rename signal_handler.odin to signal_handler_libc.odin
2024-06-02 14:54:31 -04:00
Jeroen van Rijn
6050bc3bf6
Add missing benchmarks build.bat.
2024-06-02 14:54:31 -04:00
Jeroen van Rijn
306169699c
Update ci.yml
2024-06-02 14:54:31 -04:00
Jeroen van Rijn
3354212f8e
Update ci.yml
...
Disable benchmark on Windows for a moment.
2024-06-02 14:54:31 -04:00
Jeroen van Rijn
54dae06ad1
Update CI
2024-06-02 14:54:31 -04:00
Jeroen van Rijn
8d93379e29
Factor benchmarks out into tests\benchmark\<pkg>
2024-06-02 14:54:29 -04:00
Jeroen van Rijn
62b7d8de97
Port tests\core\net
2024-06-02 14:47:09 -04:00
Jeroen van Rijn
dacb0f7786
Port tests\core\thread
2024-06-02 14:47:09 -04:00
Jeroen van Rijn
5b1ffba915
Port testing\core\time
2024-06-02 14:47:09 -04:00
Jeroen van Rijn
a406ff7063
Port tests\core\strings
2024-06-02 14:47:09 -04:00
Jeroen van Rijn
9ba02e888d
Port tests\core\slice
2024-06-02 14:47:09 -04:00
Jeroen van Rijn
ed0384c102
Port tests\core\runtime
2024-06-02 14:47:09 -04:00
Jeroen van Rijn
80b115748f
Port tests\core\reflect
2024-06-02 14:47:09 -04:00
Jeroen van Rijn
9829a02571
Port tests\core\odin
2024-06-02 14:47:09 -04:00
Jeroen van Rijn
8383a45b62
Port tests\core\text\match
2024-06-02 14:47:09 -04:00
Jeroen van Rijn
b0faab29e0
Port tests\core\math, math\linalg\glsl and math\noise
2024-06-02 14:47:09 -04:00
Jeroen van Rijn
d7bfbe0552
Port testing\core\text\i18n
2024-06-02 14:47:08 -04:00
Jeroen van Rijn
39fd73fe17
Port testing\core\hash
2024-06-02 14:47:08 -04:00
Jeroen van Rijn
6f7c5a7577
Port tests\core\fmt
2024-06-02 14:47:08 -04:00
Jeroen van Rijn
d334b8c72a
Port tests\core\path\filepath
2024-06-02 14:47:08 -04:00
Jeroen van Rijn
9d0f4833bf
Port tests\core\encoding\xml
...
Made them run in parallel as well.
2024-06-02 14:47:08 -04:00
Jeroen van Rijn
6641a6f6c9
Port tests\core\encoding\varint
2024-06-02 14:47:08 -04:00
Jeroen van Rijn
601df0e8f7
Port tests\core\encoding\json
2024-06-02 14:47:08 -04:00
Jeroen van Rijn
1b32e27aa4
Port tests\core\encoding\hxa
...
And fix a few leaks in `core:encoding/hxa` while at it.
2024-06-02 14:47:08 -04:00
Jeroen van Rijn
3404dea8ac
Port tests\encoding\hex
2024-06-02 14:47:08 -04:00
Jeroen van Rijn
40b20fb473
Port tests\core\c\libc
2024-06-02 14:47:08 -04:00
Feoramund
b74b956fda
Remove unneeded import
2024-06-02 14:47:08 -04:00
Feoramund
1f6a6f2cd3
Support deterministic random seeding of tests
...
Add a new option `ODIN_TEST_RANDOM_SEED` which is picked from the cycle
counter at startup, if it's not specified by the user.
This number is sent to every test in the `T` struct and reset every test
(just in case).
2024-06-02 14:47:07 -04:00
Jeroen van Rijn
a27b167218
Update tests\core\encoding\cbor to use new test runner.
...
It was leaky and required a substantial number of `loc := #caller_location` additions to parts of the core library to make it easier to track down how and where it leaked.
The tests now run fine multi-threaded.
2024-06-02 14:47:07 -04:00
Jeroen van Rijn
6a1649d8aa
Update using new defaults for memory + reporting width
2024-06-02 14:47:07 -04:00
Feoramund
84ad71fdb3
Support ODIN_TEST_PROGRESS_WIDTH=0
...
This will automatically calculate how wide the progress bars should be
based on the package with the greatest number of tests.
The progress width is now capped to 100.
2024-06-02 14:47:07 -04:00
Feoramund
49fa66370f
Report test memory usage only if there's an issue
...
Adds new option `ODIN_TEST_ALWAYS_REPORT_MEMORY`, for when you always
want to see the memory usage report.
2024-06-02 14:47:07 -04:00
Feoramund
e1a3c0e21d
Track memory in the test runner by default
2024-06-02 14:47:07 -04:00
Feoramund
bf42e39b1c
Be specific about int size for Rollback_Stack asserts
...
This should fix tests failing on 32-bit platforms.
2024-06-02 14:47:07 -04:00
Jeroen van Rijn
c531427ee5
Update -define for crypto
2024-06-02 14:47:07 -04:00
Feoramund
b7e1ae7073
Change test runner options to SCREAMING_SNAKE_CASE
...
This commit also changes the name of `test_select` to `ODIN_TEST_NAMES`,
to better conform with the already-existing `-test-name:<name>` option.
2024-06-02 14:47:07 -04:00
Feoramund
e11f3d2520
Fix missing - for define in tests/core/build.bat
2024-06-02 14:47:07 -04:00
Feoramund
dcfda195d2
Send terminal control code to STDOUT instead
...
`STDERR` might be redirected, and this code signals to the terminal to
show the cursor again. Otherwise, the cursor will be invisible.
2024-06-02 14:47:07 -04:00
Feoramund
a1c5bebac7
Fix ANSI redraw eating last log line
2024-06-02 14:47:07 -04:00
Feoramund
89d8df28be
Combine multi-line attributes onto one line
2024-06-02 14:47:07 -04:00
Feoramund
dffc3af86c
Remove safe_heap_allocator from test runner
...
I was under the impression that the default `context.allocator` was not
thread-safe, but I've been told that this is not the case.
2024-06-02 14:47:06 -04:00
Feoramund
eadfbb1318
Forbid singleton allocations from shrinking their block offset
2024-06-02 14:47:06 -04:00
Feoramund
1afc235359
Use plain sort for internal_tests
2024-06-02 14:47:06 -04:00
Feoramund
09ef08f035
Add more sanity checking to mem.Rollback_Stack
2024-06-02 14:47:06 -04:00
Feoramund
0f675fa436
Use uintptr where applicable in mem.Rollback_Stack
2024-06-02 14:47:06 -04:00
Feoramund
568b746c98
Fix indentation
2024-06-02 14:47:06 -04:00