cpython/Platforms/emscripten/browser_test/run_test.sh
Hood Chatham 2be147e1e7
gh-146352: In Emscripten pyrepl test, pick port dynamically (#146375)
Dynamically allocates the port for the pyrepl browser test, so that multiple
tests can run at the same time. Also allows the pyrepl test to honor the
CROSS_BUILD_DIR environment variable.
2026-03-25 18:38:11 +08:00

11 lines
391 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
cd "$(dirname "$0")"
rm -f test_log.txt
echo "Installing node packages" | tee test_log.txt
npm ci >> test_log.txt 2>&1
echo "Installing playwright browsers" | tee test_log.txt
npx playwright install 2>> test_log.txt
export PORT=$(npx get-port-cli)
echo "Running tests with webserver on port $PORT" | tee test_log.txt
CI=1 npx playwright test | tee test_log.txt