Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run wasm tests on Windows #466

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ jobs:

- artifact: x86_64-windows
os: windows-latest
env:
# TODO: tests are pretty close to passing on Windows but need some
# final tweaks, namely testing the exit code doesn't work since
# exit codes are different on Windows and the `mmap.c` tests seems
# to have issues probably with line endings. Needs someone with a
# Windows checkout tot test further.
WASI_SDK_CI_SKIP_TESTS: 1

env: ${{ matrix.env || fromJSON('{}') }}
steps:
Expand Down
3 changes: 3 additions & 0 deletions tests/general/mmap.c.dir/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This input is read at runtime during testing so ensure that the same input is
# read on unix and windows by forcing just-a-newline for line endings.
*.txt text eol=lf
8 changes: 8 additions & 0 deletions tests/testcase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ exit_status=0
|| exit_status=$?
echo $exit_status > "$exit_status_observed"

# On Windows Wasmtime will exit with error code 3 for aborts. On Unix Wasmtime
# will exit with status 134. Paper over this difference by pretending to be Unix
# on Windows and converting exit code 3 into 134 for the purposes of asserting
# test output.
if [ "$OSTYPE" = "msys" ] && [ "$exit_status" = "3" ]; then
echo 134 > "$exit_status_observed"
fi

# Determine the reference files to compare with.
if [ -e "$input.stdout.expected" ]; then
stdout_expected="$input.stdout.expected"
Expand Down
Loading