Feoramund
d581dbbec5
Keep test runner main thread from using 100% of a CPU core
2024-06-02 14:54:32 -04:00
Feoramund
5e3e958574
Add -define:ODIN_TEST_LOG_LEVEL to set lowest log level
2024-06-02 14:54:32 -04:00
Feoramund
6a9203328b
Log thread count at test run start
...
Provides a helpful info message about the option to change how many
threads are used per run.
2024-06-02 14:54:32 -04:00
Feoramund
5db65aa796
Make it easier to learn about ODIN_TEST_CLIPBOARD
2024-06-02 14:54:32 -04:00
Feoramund
cb00b8022b
Add note about SIGSEGV edge case on UNIX-likes
2024-06-02 14:54:32 -04:00
Feoramund
4875f745c8
Remove Windows test runner in favor of libc implementation
2024-06-02 14:54:32 -04:00
Feoramund
ccdbd4b6ce
Simplify casts in mem.Rollback_Stack procs
2024-06-02 14:54:32 -04:00
Feoramund
9dcf345795
Set thread pool is_running to false on shutdown
2024-06-02 14:54:32 -04:00
Feoramund
21064fbb60
Clear thread pool task data on restart
2024-06-02 14:54:32 -04:00
Feoramund
45fa9d8148
Expand documentation comment for ODIN_TEST_NAMES
2024-06-02 14:54:32 -04:00
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