Files
dotnet-runtime/eng/testing/WasmRunnerTemplate.sh
c260375d7d Cleanup functional tests / Structure them like libraries tests (#46810)
You should now be able to run the functional tests locally the same way as running the libraries tests.

Example:
`./dotnet.sh build /t:Test src/tests/FunctionalTests/wasm/Interpreter/console/ /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release`

Co-authored-by: Steve Pfister <[email protected]>
Co-authored-by: Maxim Lipnin <[email protected]>
2021-01-15 08:36:52 -05:00

36 lines
785 B
Bash

#!/usr/bin/env bash
EXECUTION_DIR=$(dirname $0)
SCENARIO=$3
cd $EXECUTION_DIR
if [ -z "$HELIX_WORKITEM_UPLOAD_ROOT" ]; then
XHARNESS_OUT="$EXECUTION_DIR/xharness-output"
else
XHARNESS_OUT="$HELIX_WORKITEM_UPLOAD_ROOT/xharness-output"
fi
if [ ! -z "$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 [ "$SCENARIO" == "WasmTestOnBrowser" ]; then
XHARNESS_COMMAND="test-browser"
elif [ -z "$XHARNESS_COMMAND" ]; then
XHARNESS_COMMAND="test"
fi
# RunCommands defined in tests.mobile.targets
[[RunCommands]]
_exitCode=$?
echo "XHarness artifacts: $XHARNESS_OUT"
exit $_exitCode