node/test/wasi
Joyee Cheung f845a16c58 test: split wasi tests
Move the child process code into a fixture and split the test
so that it can be run in parallel and it's easier to identify
where the failure is coming from. Also use the
spawnSyncAndExitWithoutError() utility so that the test shows
complete information on failure.

Instead of marking all the wasi tests as flaky, only mark the
wasi-poll one which is flaking in the CI now.

PR-URL: https://github.com/nodejs/node/pull/51836
Refs: https://github.com/nodejs/node/issues/51822
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2024-02-27 12:10:13 +01:00
..
c deps: update uvwasi to 0.0.20 and fixup tests 2024-02-15 12:02:30 +01:00
wasm deps: update uvwasi to 0.0.20 and fixup tests 2024-02-15 12:02:30 +01:00
Makefile
README.md wasi: fix up wasi tests for ibmi 2023-10-04 16:35:39 +00:00
test-return-on-exit.js wasi: make version non-optional 2023-04-06 17:46:58 -04:00
test-wasi-exitcode.js test: split wasi tests 2024-02-27 12:10:13 +01:00
test-wasi-initialize-validation.js wasi: make version non-optional 2023-04-06 17:46:58 -04:00
test-wasi-io.js test: split wasi tests 2024-02-27 12:10:13 +01:00
test-wasi-not-started.js test: ensure never settling promises are detected 2023-11-11 20:37:42 +01:00
test-wasi-options-validation.js wasi: make version non-optional 2023-04-06 17:46:58 -04:00
test-wasi-poll.js test: split wasi tests 2024-02-27 12:10:13 +01:00
test-wasi-start-validation.js wasi: make version non-optional 2023-04-06 17:46:58 -04:00
test-wasi-stdio.js test: use tmpdir.resolve() 2023-08-21 16:41:53 +00:00
test-wasi-symlinks.js deps: update uvwasi to 0.0.20 and fixup tests 2024-02-15 12:02:30 +01:00
test-wasi-worker-terminate.js wasi: make version non-optional 2023-04-06 17:46:58 -04:00
test-wasi.js test: split wasi tests 2024-02-27 12:10:13 +01:00
testcfg.py
wasi.status test: split wasi tests 2024-02-27 12:10:13 +01:00

WASI Tests

Compile with clang and wasm32-wasi target by using the wasi-sdk version 20

Install wasi-sdk and then set WASI_SDK_PATH to the root of the install.

You can then rebuild the wasm for the tests by running:

make CC=${WASI_SDK_PATH}/bin/clang SYSROOT=${WASI_SDK_PATH}/share/wasi-sysroot

If you update the version of the wasi-sdk to be used for the compile remove all of the *.wasm files in the wasm directory to ensure you rebuild/test all of the tests with the new version.