Commit Graph

10969 Commits

Author SHA1 Message Date
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
Jeroen van Rijn
a0b2ea6d6e Update tests\core\crypto 2024-06-02 14:46:59 -04:00
Jeroen van Rijn
a463e282db Update core:container tests 2024-06-02 14:34:31 -04:00
Jeroen van Rijn
e3181c13c6 Update core:compress tests 2024-06-02 14:34:31 -04:00
Jeroen van Rijn
22c092f846 Delete duplicated flag. 2024-06-02 14:34:31 -04:00
Jeroen van Rijn
eb3d6d7d75 Update core:image tests to use new runner. 2024-06-02 14:34:31 -04:00
Feoramund
852f694bee Get tests passing again
`T` no longer has a writer assigned to it.

`test_core_cbor.odin` has global state and is run with `odin test`,
so I've set it to use only one thread.
2024-06-02 14:34:31 -04:00
Feoramund
87ea4a2652 Temporarily disable Windows-specific test runner
I do not have a Windows machine to test the refactored test runner, and
I am unsure if it would even run correctly on Windows without this
disabled.
2024-06-02 14:34:31 -04:00
Feoramund
d03024088a Remove unneeded code 2024-06-02 14:34:31 -04:00
Feoramund
b6c4dfb68d Refactor the test runner
Changes

- Support multi-threaded testing.
- Support `set_fail_timeout` on all platforms.
- Display an animated progress report.
- Setup all tests with a context logger.
- Give all tests their own separate custom allocators.
- Support tracking test memory usage.
- Display a summary of the failed tests at the end.
- Let users select only specific tests to run.
- Support copying failed tests to the clipboard to run again.
- Support catching SIGINT (CTRL-C) to cancel early.
- Record context in cleanup procs.
- Write all log messages to STDERR for easy redirection.
- Possibly more I've forgotten.

New Options

- `-define:test_threads=N`: Specify thread count.
- `-define:test_thread_memory=B`: Specify initial memory block size in bytes to each thread.
- `-define:test_track_memory=true`: Track the memory usage of individual tests.
- `-define:test_fancy=false`: Disable animated progress report.
- `-define:test_select=package.test_name,...`: Run only select tests.
- `-define:test_clipboard=true`: Copy names of failed tests to the clipboard.
- `-define:test_progress_width=24`: Change the width of the animated progress bars.
2024-06-02 14:34:31 -04:00
Feoramund
95c2e020ff Share libc signal definitions with more platforms
I confirmed that these 3 platforms share the same signal definitions
from these sources.

Haiku: https://github.com/haiku/haiku/blob/master/headers/posix/signal.h
OpenBSD: https://github.com/openbsd/src/blob/master/sys/sys/signal.h
NetBSD: http://fxr.watson.org/fxr/source/sys/signal.h?v=NETBSD
2024-06-02 14:34:30 -04:00
Feoramund
50dffaf131 Add mem.Rollback_Stack 2024-06-02 14:34:30 -04:00
Feoramund
fc4f6b87bb Add core:encoding/ansi package 2024-06-02 14:34:30 -04:00
Feoramund
8137b9dd75 Add mem.tracking_allocator_reset 2024-06-02 14:34:30 -04:00
Feoramund
558c330028 Add task-stopping functionality to thread.Pool 2024-06-02 14:34:30 -04:00
Feoramund
1875e7c36a Make log.do_*_header argument orders consistent 2024-06-02 14:34:30 -04:00
Feoramund
7d4da6eaa7 Fix trailing space with only .Date log option 2024-06-02 14:34:30 -04:00
Feoramund
8ae375dbff Move log timestamping out to do_time_header proc 2024-06-02 14:34:30 -04:00
Jeroen van Rijn
c07a46abc9 Merge pull request #3635 from Yawning/feature/aes
core/crypto: Add AES
2024-06-01 21:42:59 +02:00
Yawning Angel
c751e4b2eb core/crypto/aes: Add AES implementation 2024-06-01 22:55:42 +09:00
Yawning Angel
1ade62b630 core/crypto/_aes/ct64: Add GHASH 2024-06-01 22:55:42 +09:00
Yawning Angel
cba58924a8 core/crypto/_aes: 64-bit portable implementation 2024-06-01 22:55:42 +09:00
Yawning Angel
f49575f1fb core/simd/x86: Add the AES-NI intrinsics 2024-06-01 22:55:42 +09:00
gingerBill
72a5e74ef3 Merge pull request #3658 from laytan/wasm64p32-runtime-fixes
wasm: fix runtime.js even more for wasm64p32
2024-05-31 23:17:52 +01:00
gingerBill
881340fd3b Merge pull request #3659 from thetarnav/unreachable
Add unreachable to base/builtin/builtin.odin
2024-05-31 23:17:08 +01:00
Damian Tarnawski
451dc645df Add unreachable to base/builtin/builtin.odin 2024-05-31 21:55:40 +02:00
Laytan Laats
8a521648b9 wasm: fix runtime.js even more for wasm64p32
- make the int size configurable in the `runWasm` call, no more
  constants to hunt down and change
- make storeU64 and storeI64 handle bigints, this is needed in the
  odin_dom library
- fix alignment issues within init_event_raw
2024-05-31 20:57:15 +02:00
gingerBill
5628cfabe5 Merge branch 'master' of https://github.com/odin-lang/Odin 2024-05-31 16:35:38 +01:00
gingerBill
31a9b3f428 core:encoding/ini 2024-05-31 16:35:30 +01:00
Jeroen van Rijn
e12ff63b16 Merge pull request #3657 from laytan/fix-wasm64p32-procs
wasm: fix target wasm64p32 runtime procs
2024-05-31 17:03:52 +02:00
Laytan Laats
3a0ec3d6a8 wasm: fix target wasm64p32 runtime procs
LLVM generates calls with `i32` regardless of target, so if a call to
any of these procs was generated this failed to compile.

I opted to fix by changing from `int` to `i32` on wasm64p32 and adding
`#any_int` so existing code keeps working.
2024-05-31 16:32:27 +02:00
gingerBill
ffded3d557 Merge pull request #3655 from iErik/master
core:sys/linux - Add support for Unix Domain Socket addresses
2024-05-31 10:32:19 +01:00
gingerBill
ae63fd9230 Fix #3649 2024-05-30 23:08:42 +01:00
gingerBill
6d9957d7e4 Fix types again 2024-05-30 21:59:01 +01:00
gingerBill
e737122ce8 Add experimental target orca_wasm32 2024-05-30 21:58:27 +01:00
gingerBill
8db87170a9 Clean up handle_link_name handling of link_suffix 2024-05-30 21:53:23 +01:00
gingerBill
ba1e9c8abe Fix #3651 2024-05-30 21:50:30 +01:00
gingerBill
66acbb7fed Add @(link_suffix=<string>) 2024-05-30 21:48:23 +01:00