Feoramund
fa29974dab
Use Warning log level for reporting memory leaks
...
Works well with `-define:ODIN_TEST_LOG_LEVEL=warning`.
2024-06-02 23:21:44 -04:00
Feoramund
7764ab2ab0
Prevent test runner deadlock on NetBSD
...
Add `pthread_testcancel` to `core:sys/unix`
2024-06-02 21:27:36 -04:00
Feoramund
6a5633df2d
Fix wrong PTHREAD_CANCEL_ASYNCHRONOUS on FreeBSD and OpenBSD
...
The test runner was deadlocking when a test raised a signal on FreeBSD.
This is untested on OpenBSD, but I have referenced this file:
https://github.com/openbsd/src/blob/master/include/pthread.h
2024-06-02 20:41:25 -04:00
Feoramund
c8539fe411
Revert "Disable NetBSD tests until 'undefined reference to stdout' is solved."
...
This reverts commit 21a1ddfbae .
2024-06-02 19:29:27 -04:00
Feoramund
ac9484206b
Fix STDIN, STDOUT, STDERR handles for BSDs
...
Tested on FreeBSD 14.0 and NetBSD 10.0
OpenBSD is untested, but link names were sourced from:
https://github.com/openbsd/src/blob/master/include/stdio.h
According to this, OpenBSD shares the same layout as NetBSD.
FreeBSD has the same as Darwin in this regard.
2024-06-02 19:29:27 -04:00
Feoramund
f77ce359ce
Be pedantic about not overwriting Odin errors
...
I was encountering bounds-check error messages being overwritten during
a test, if the test failed for another reason and sent a log message.
The original intent of having this check inside of the above `if` block
was that if a test sent an error message, then it was assumed an
overwrite would be safe, but it's completely possible for a test to fail
for a legitimate reason, then do an unrelated bounds check somewhere
else that would be buried under the animation.
This change will make sure that, no matter what, the progress display
will not trigger a clear if a signal was raised. There's still no
guarantee that bounds-check messages will be printed properly, and it's
best to redirect STDERR.
The only way that can be fixed is if they get a similar hook to
`context.assertion_failure_proc`.
2024-06-02 15:51:26 -04:00
Feoramund
3f1249c27e
Tell user about ODIN_TEST_RANDOM_SEED option
2024-06-02 15:34:13 -04:00
Feoramund
8d8c42e962
Use T.seed in tests where applicable
2024-06-02 15:30:23 -04:00
Jeroen van Rijn
60d0c03134
Strip old test runner back out of internal, issues and vendor
2024-06-02 21:15:25 +02:00
Jeroen van Rijn
9d8d864400
Plug leak in AES tests.
2024-06-02 21:12:24 +02:00
Jeroen van Rijn
21a1ddfbae
Disable NetBSD tests until 'undefined reference to stdout' is solved.
2024-06-02 21:03:22 +02:00
Feoramund
890fe07c6e
Disable FANCY_OUTPUT in Odin test scripts
...
This should tidy up the CI output logs a bit.
2024-06-02 14:54:32 -04:00
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