2023-01-17 17:16:49 -06:00
|
|
|
#!/bin/bash
|
2023-01-17 12:22:01 -06:00
|
|
|
|
2023-01-17 17:16:49 -06:00
|
|
|
set -xe
|
|
|
|
|
|
|
|
MODE=$1
|
2023-01-27 15:53:20 -06:00
|
|
|
TEST=$2
|
2023-01-17 17:16:49 -06:00
|
|
|
|
2023-01-26 10:55:09 -06:00
|
|
|
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
|
2023-01-26 19:36:12 -06:00
|
|
|
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 \
|
2023-01-27 15:53:20 -06:00
|
|
|
selenium-node:latest robot -d /output /tests/$TEST
|
2023-01-26 10:55:09 -06:00
|
|
|
|
2023-01-17 17:16:49 -06:00
|
|
|
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
|