-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wasm] wasi: Enable library tests on CI (#81052)
- Loading branch information
Showing
67 changed files
with
3,076 additions
and
361 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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 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 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 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.