werefox-cafe/run_tests.sh

23 lines
792 B
Bash
Raw Normal View History

#!/bin/bash
set -xe
MODE=$1
TEST=$2
if [ "$MODE" == "--debug-server" ] || [ "$MODE" == "-s" ]; then
docker run --rm --name selenium-debug-server -p "4444:4444" -p "7900:7900" -e SE_OPTS="--allow-cors true" --shm-size="2g" selenium/standalone-chrome:108.0
elif [ "$MODE" == "--debug-node" ] || [ "$MODE" == "-n" ]; then
docker run --rm --name selenium-debug-node \
-e "PYTHONPYCACHEPREFIX=/dev/null/" \
-v $(pwd)/tests/test_suite:/tests \
-v $(pwd)/tests/output:/output \
-v $(pwd)/src/info/data:/data \
selenium-node:latest robot -d /output /tests/$TEST
else
cd tests/
docker compose build --no-cache --pull && docker compose up --remove-orphans --abort-on-container-exit --exit-code-from selenium-node
docker compose rm -sf
fi