-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wasi] CI: Add AOT library tests job (#95146)
* [wasm] Move LocalBuild, and aot targets to wasm/shared * Runner scripts: honor $PREPEND_PATH * Add support for AOT projects on helix, for wasi * CI: Add wasi aot smoke test projects * CI: Add jobs for wasi aot/smoke tests * CI: Add wasi/aot jobs on runtime-wasm * CI: fix wasi tests list * Fix wasi/windows builds where WasmAssemblyFileName contains the path also * Remove failing tests * [wasm] WBT: Set RID explicitly only for library tests * [wasi] Add --engine-arg=--max-wasm-stack=134217728 for library tests, based on feedback from Zoltan * [wasi] CI: Use shouldContinueOnError=true for aot library tests This adds the job to `runtime-wasm` also, which will run a larger subset of tests but will ignore any failures. For the smoke tests job, failures are not ignored.
- Loading branch information
Showing
23 changed files
with
259 additions
and
78 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#!/usr/bin/env bash | ||
|
||
# SetCommands defined in eng\testing\tests.wasm.targets | ||
[[SetCommands]] | ||
[[SetCommandsEcho]] | ||
|
||
EXECUTION_DIR=$(dirname $0) | ||
if [[ -n "$3" ]]; then | ||
SCENARIO=$3 | ||
fi | ||
|
||
export PATH=$PREPEND_PATH:$PATH | ||
|
||
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 | ||
|
||
echo PATH=$PATH | ||
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 | ||
|
||
function _buildAOTFunc() | ||
{ | ||
local projectFile=$1 | ||
local binLog=$2 | ||
shift 2 | ||
|
||
time dotnet msbuild $projectFile /bl:$binLog $* | ||
local buildExitCode=$? | ||
|
||
echo "\n** Performance summary for the build **\n" | ||
dotnet msbuild $binLog -clp:PerformanceSummary -v:q -nologo | ||
if [[ "$(uname -s)" == "Linux" && $buildExitCode -ne 0 ]]; then | ||
echo "\nLast few messages from dmesg:\n" | ||
local lastLines=`dmesg | tail -n 20` | ||
echo $lastLines | ||
|
||
if [[ "$lastLines" =~ "oom-kill" ]]; then | ||
return 9200 # OOM | ||
fi | ||
fi | ||
|
||
echo | ||
echo | ||
|
||
if [[ $buildExitCode -ne 0 ]]; then | ||
return 9100 # aot build failure | ||
fi | ||
|
||
return 0 | ||
} | ||
|
||
pushd $EXECUTION_DIR | ||
|
||
# ========================= BEGIN Test Execution ============================= | ||
echo ----- start $(date) =============== To repro directly: ===================================================== | ||
echo pushd $EXECUTION_DIR | ||
# RunCommands defined in eng\testing\tests.wasm.targets | ||
[[RunCommandsEcho]] | ||
echo popd | ||
echo =========================================================================================================== | ||
pushd $EXECUTION_DIR | ||
# RunCommands defined in eng\testing\tests.wasm.targets | ||
[[RunCommands]] | ||
_exitCode=$? | ||
popd | ||
echo ----- end $(date) ----- exit code $_exitCode ---------------------------------------------------------- | ||
|
||
echo "XHarness artifacts: $XHARNESS_OUT" | ||
|
||
exit $_exitCode |
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
Oops, something went wrong.