mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2024-10-16 13:02:32 +00:00
Enable running WASI tests on Windows (#2489)
Tests are not passing yet therefore we don't enable them in CI.
This commit is contained in:
parent
aefb265b0d
commit
834e0314aa
|
@ -9,9 +9,22 @@ readonly MODE=$1
|
|||
readonly TARGET=$2
|
||||
|
||||
readonly WORK_DIR=$PWD
|
||||
|
||||
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then
|
||||
readonly PLATFORM=windows
|
||||
readonly PYTHON_EXE=python
|
||||
# see https://github.com/pypa/virtualenv/commit/993ba1316a83b760370f5a3872b3f5ef4dd904c1
|
||||
readonly VENV_BIN_DIR=Scripts
|
||||
readonly IWASM_EXE=$(cygpath -m "${WORK_DIR}/../../../../product-mini/platforms/${PLATFORM}/build/RelWithDebInfo/iwasm.exe")
|
||||
else
|
||||
readonly PLATFORM=$(uname -s | tr A-Z a-z)
|
||||
readonly VENV_BIN_DIR=bin
|
||||
readonly PYTHON_EXE=python3
|
||||
readonly IWASM_EXE="${WORK_DIR}/../../../../product-mini/platforms/${PLATFORM}/build/iwasm"
|
||||
fi
|
||||
|
||||
readonly WAMR_DIR="${WORK_DIR}/../../../.."
|
||||
readonly IWASM_CMD="${WORK_DIR}/../../../../product-mini/platforms/${PLATFORM}/build/iwasm \
|
||||
readonly IWASM_CMD="${IWASM_EXE} \
|
||||
--allow-resolve=google-public-dns-a.google.com \
|
||||
--addr-pool=::1/128,127.0.0.1/32"
|
||||
readonly IWASM_CMD_STRESS="${IWASM_CMD} --max-threads=8"
|
||||
|
@ -59,8 +72,8 @@ run_aot_tests () {
|
|||
}
|
||||
|
||||
if [[ $MODE != "aot" ]];then
|
||||
python3 -m venv wasi-env && source wasi-env/bin/activate
|
||||
python3 -m pip install -r test-runner/requirements.txt
|
||||
$PYTHON_EXE -m venv wasi-env && source wasi-env/${VENV_BIN_DIR}/activate
|
||||
$PYTHON_EXE -m pip install -r test-runner/requirements.txt
|
||||
|
||||
# Stress test requires max-threads=8 so it's run separately
|
||||
if [[ -e "${THREAD_INTERNAL_TESTS}spawn_stress_test.wasm" ]]; then
|
||||
|
@ -72,7 +85,7 @@ if [[ $MODE != "aot" ]];then
|
|||
fi
|
||||
fi
|
||||
|
||||
TEST_RUNTIME_EXE="${IWASM_CMD}" python3 test-runner/wasi_test_runner.py \
|
||||
TEST_RUNTIME_EXE="${IWASM_CMD}" $PYTHON_EXE test-runner/wasi_test_runner.py \
|
||||
-r adapters/wasm-micro-runtime.py \
|
||||
-t \
|
||||
${C_TESTS} \
|
||||
|
|
Loading…
Reference in New Issue
Block a user