-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[wasm] wasi: Enable library tests on CI #81052
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
Merged
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
a564ab2
Add tasks from https://github.com/SteveSandersonMS/dotnet-wasi-sdk
radical 5db6d5c
build changes
radical 023226a
add test build changes
radical ce9dff4
test fixes
radical 8e59b0d
add more wasi build files
radical 03b6c28
fix wasi sample
radical 5d977c2
add missing files
radical d918291
disable non-wasi/wasm builds
radical 7d659e3
address feedback from @pavelsavara
radical d7f70d2
Merge remote-tracking branch 'origin/main' into wasi_tests
radical 396e4df
cleanup
radical fd211a8
restore ci builds
radical 7ad2c72
fix the optional build
radical 4564943
Address review feedback from @pavelsavara
radical 44ca339
Fix analyzer errors
radical c93e98a
Address review feedback from @pavelsavara
radical 00121bc
gen-buildsys.cmd: fix wasi sdk path on windows
radical 3a3f499
Always set arch=wasm for OS=browser, and OS=wasi
radical 2cba616
[wasi] Fix wasi/windows build
radical 855af93
cleanup
radical 025d0a4
Add wasi windows job
radical 40c38b7
Merge remote-tracking branch 'origin/main' into wasi_tests
radical 3f53baa
Fix building sample
radical 0c21d23
Fixes for running wasi sample, and library tests - System.Buffers.Tes…
radical 89ddbb5
fix wasm tests
radical b8c9676
fix wasm tests
radical 6a345ea
Merge remote-tracking branch 'origin/main' into wasi_tests
radical 110c126
fix sample
pavelsavara 851145f
runner script for windows
pavelsavara 6b12f34
forgot to add WasiRunnerTemplate.cmd
radical 9952901
fix sample again
pavelsavara 0ea5bab
[wasm] fix wasi tests on windows/CI
radical 0fd51b8
[wasm] Add wasi tests for CI/win
radical efea8b9
Merge remote-tracking branch 'origin/main' into wasi_tests
radical d97cb02
fix stack range again
pavelsavara a2239d4
* stack first
pavelsavara bf21da7
- back to assembly in .S file. extern doesn't work is zero
pavelsavara 2c49658
[wasm] wasi: Fix assert, and compute stack size at run time
radical 6fbd475
fix typos in makefile
radical 3746b09
Run System.Collections.Tests also, which would test the oom case
radical File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# This is a wrapper yml for `extra-platforms/runtime-extra-platforms-wasm.yml`, which | ||
# has all the wasm jobs. This file is essentially so we can have point | ||
# the pipeline in azdo UI to this, and thus avoid any scheduled triggers | ||
|
||
trigger: none | ||
|
||
variables: | ||
- template: /eng/pipelines/common/variables.yml | ||
|
||
extends: | ||
template: /eng/pipelines/common/templates/pipeline-with-resources.yml | ||
parameters: | ||
stages: | ||
- stage: Build | ||
jobs: | ||
|
||
# | ||
# Evaluate paths | ||
# | ||
- template: /eng/pipelines/common/evaluate-default-paths.yml | ||
|
||
- template: /eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml | ||
parameters: | ||
isExtraPlatformsBuild: ${{ variables.isExtraPlatformsBuild }} | ||
isWasmOnlyBuild: ${{ variables.isWasmOnlyBuild }} | ||
isRollingBuild: ${{ variables.isRollingBuild }} | ||
excludeLibTests: true | ||
excludeNonLibTests: true | ||
excludeOptional: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
@echo off | ||
setlocal enabledelayedexpansion | ||
|
||
:: SetCommands defined in eng\testing\tests.wasi.targets | ||
[[SetCommands]] | ||
[[SetCommandsEcho]] | ||
|
||
set EXECUTION_DIR=%~dp0 | ||
if [%3] NEQ [] ( | ||
set SCENARIO=%3 | ||
) | ||
|
||
if [%HELIX_WORKITEM_UPLOAD_ROOT%] == [] ( | ||
set "XHARNESS_OUT=%EXECUTION_DIR%xharness-output" | ||
) else ( | ||
set "XHARNESS_OUT=%HELIX_WORKITEM_UPLOAD_ROOT%\xharness-output" | ||
) | ||
|
||
if [%XHARNESS_CLI_PATH%] NEQ [] ( | ||
:: When running in CI, we only have the .NET runtime available | ||
:: We need to call the XHarness CLI DLL directly via dotnet exec | ||
set HARNESS_RUNNER=dotnet.exe exec "%XHARNESS_CLI_PATH%" | ||
) else ( | ||
set HARNESS_RUNNER=dotnet.exe xharness | ||
) | ||
|
||
if [%XHARNESS_COMMAND%] == [] ( | ||
set XHARNESS_COMMAND=test | ||
) | ||
|
||
if [%XHARNESS_ARGS%] == [] ( | ||
set "XHARNESS_ARGS=%ENGINE_ARGS%" | ||
) | ||
|
||
if [%PREPEND_PATH%] NEQ [] ( | ||
set "PATH=%PREPEND_PATH%:%PATH%" | ||
) | ||
|
||
if [%XUNIT_RANDOM_ORDER_SEED%] NEQ [] ( | ||
set "WasmXHarnessMonoArgs=%WasmXHarnessMonoArgs% --setenv=XUNIT_RANDOM_ORDER_SEED=%XUNIT_RANDOM_ORDER_SEED%" | ||
) | ||
|
||
echo EXECUTION_DIR=%EXECUTION_DIR% | ||
echo SCENARIO=%SCENARIO% | ||
echo XHARNESS_OUT=%XHARNESS_OUT% | ||
echo XHARNESS_CLI_PATH=%XHARNESS_CLI_PATH% | ||
echo HARNESS_RUNNER=%HARNESS_RUNNER% | ||
echo XHARNESS_COMMAND=%XHARNESS_COMMAND% | ||
echo XHARNESS_ARGS=%XHARNESS_ARGS% | ||
|
||
:: ========================= BEGIN Test Execution ============================= | ||
echo ----- start %DATE% %TIME% =============== To repro directly: ===================================================== | ||
echo pushd %EXECUTION_DIR% | ||
:: RunCommands defined in eng\testing\tests.wasi.targets | ||
[[RunCommandsEcho]] | ||
echo popd | ||
echo =========================================================================================================== | ||
pushd %EXECUTION_DIR% | ||
@echo on | ||
:: RunCommands defined in eng\testing\tests.wasi.targets | ||
[[RunCommands]] | ||
set EXIT_CODE=%ERRORLEVEL% | ||
@echo off | ||
popd | ||
echo ----- end %DATE% %TIME% ----- exit code %EXIT_CODE% ---------------------------------------------------------- | ||
|
||
echo XHarness artifacts: %XHARNESS_OUT% | ||
|
||
exit /b %EXIT_CODE% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/usr/bin/env bash | ||
|
||
# SetCommands defined in eng\testing\tests.wasi.targets | ||
[[SetCommands]] | ||
[[SetCommandsEcho]] | ||
|
||
EXECUTION_DIR=$(dirname $0) | ||
if [[ -n "$3" ]]; then | ||
SCENARIO=$3 | ||
fi | ||
|
||
if [[ -z "$HELIX_WORKITEM_UPLOAD_ROOT" ]]; then | ||
XHARNESS_OUT="$EXECUTION_DIR/xharness-output" | ||
else | ||
XHARNESS_OUT="$HELIX_WORKITEM_UPLOAD_ROOT/xharness-output" | ||
fi | ||
|
||
if [[ -n "$XHARNESS_CLI_PATH" ]]; then | ||
# When running in CI, we only have the .NET runtime available | ||
# We need to call the XHarness CLI DLL directly via dotnet exec | ||
HARNESS_RUNNER="dotnet exec $XHARNESS_CLI_PATH" | ||
else | ||
HARNESS_RUNNER="dotnet xharness" | ||
fi | ||
|
||
if [[ -z "$XHARNESS_COMMAND" ]]; then | ||
XHARNESS_COMMAND="test" | ||
fi | ||
|
||
if [[ -z "$XHARNESS_ARGS" ]]; then | ||
XHARNESS_ARGS="$ENGINE_ARGS" | ||
fi | ||
|
||
if [[ -n "$PREPEND_PATH" ]]; then | ||
export PATH=$PREPEND_PATH:$PATH | ||
fi | ||
|
||
if [[ -n "$XUNIT_RANDOM_ORDER_SEED" ]]; then | ||
WasmXHarnessMonoArgs="${WasmXHarnessMonoArgs} --setenv=XUNIT_RANDOM_ORDER_SEED=${XUNIT_RANDOM_ORDER_SEED}" | ||
fi | ||
|
||
echo EXECUTION_DIR=$EXECUTION_DIR | ||
echo SCENARIO=$SCENARIO | ||
echo XHARNESS_OUT=$XHARNESS_OUT | ||
echo XHARNESS_CLI_PATH=$XHARNESS_CLI_PATH | ||
echo HARNESS_RUNNER=$HARNESS_RUNNER | ||
echo XHARNESS_COMMAND=$XHARNESS_COMMAND | ||
echo XHARNESS_ARGS=$XHARNESS_ARGS | ||
|
||
pushd $EXECUTION_DIR | ||
|
||
# ========================= BEGIN Test Execution ============================= | ||
echo ----- start $(date) =============== To repro directly: ===================================================== | ||
echo pushd $EXECUTION_DIR | ||
# RunCommands defined in eng\testing\tests.wasi.targets | ||
[[RunCommandsEcho]] | ||
echo popd | ||
echo =========================================================================================================== | ||
pushd $EXECUTION_DIR | ||
# RunCommands defined in eng\testing\tests.wasi.targets | ||
[[RunCommands]] | ||
_exitCode=$? | ||
popd | ||
echo ----- end $(date) ----- exit code $_exitCode ---------------------------------------------------------- | ||
|
||
echo "XHarness artifacts: $XHARNESS_OUT" | ||
|
||
exit $_exitCode |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.