Skip to content

Commit ab22489

Browse files
committed
fix
1 parent 6309cb6 commit ab22489

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

scripts/test-module.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,25 @@ LEADER_NODE="${1:?missing LEADER_NODE argument}"
1313
IMAGE_URL="${2:?missing IMAGE_URL argument}"
1414
shift 2
1515

16-
ssh_key="$(< $SSH_KEYFILE)"
16+
ssh_key="$(<$SSH_KEYFILE)"
1717
venvroot=/usr/local/venv
18+
script_dir="$(cd "$(dirname "$0")" && pwd)"
1819

1920
echo "Test! RUN_UI_TESTS=${RUN_UI_TESTS} ////"
2021

2122
if [ "${RUN_UI_TESTS}" = "true" ]; then
2223
container_image="mcr.microsoft.com/playwright/python:v1.51.0-noble"
2324
container_shell="bash"
24-
pythonreq="/srv/source/tests/pythonreq-ui.txt"
25+
pythonreq="/srv/ns8-github-actions/tests/pythonreq-ui.txt"
2526
else
2627
container_image="docker.io/python:3.11-alpine"
2728
container_shell="ash"
28-
pythonreq="/srv/source/tests/pythonreq.txt"
29+
pythonreq="/srv/ns8-github-actions/tests/pythonreq.txt"
2930
fi
3031

3132
podman run -i \
3233
--volume=.:/srv/source:z \
34+
--volume=${script_dir}/tests:/srv/ns8-github-actions/tests:z \
3335
--volume=rftest-cache:${venvroot}:z \
3436
--replace --name=rftest \
3537
--env=ssh_key \
@@ -44,9 +46,12 @@ set -e
4446
echo "$ssh_key" > /tmp/idssh
4547
if [ ! -x ${venvroot}/bin/robot ] ; then
4648
if command -v apt-get > /dev/null 2>&1; then
47-
apt install -y -q python3.12-venv
49+
apt-get install -y -q nodejs npm python3-pip
50+
pip3 install -q virtualenv
51+
python3 -mvirtualenv ${venvroot}
52+
else
53+
python3 -mvenv ${venvroot} --upgrade
4854
fi
49-
python3 -mvenv ${venvroot} --upgrade
5055
${venvroot}/bin/pip3 install -q -r ${pythonreq}
5156
fi
5257
if [ "${RUN_UI_TESTS}" = "true" ] && [ ! -f ${venvroot}/.rfbrowser_initialized ] ; then

0 commit comments

Comments
 (0)