TiledViz
Loading...
Searching...
No Matches
selenium_tests.sh
1#!/bin/sh
2DATE=$(date +%F_%H-%M)
3tmpDIR=/tmp/tests_Selenium_${DATE}
4mkdir ${tmpDIR}
5initPWD=$(pwd)
6
7docker run -t -v /dev/shm:/dev/shm -v ${tmpDIR}:/tmp/tests:rw -v $(pwd)/TVWeb/Selenium:/usr/local/Selenium --add-host="flaskdock:$IPFlask" --name selenium --rm joyzoursky/python-chromedriver:3.7-alpine3.8-selenium python3 /usr/local/Selenium/test_script.py > ${tmpDIR}/test_script.log 2>&1
8RET=$?
9cat ${tmpDIR}/test_script.log
10if [ $RET -gt 0 ]; then
11 echo "Error for unit tests with Selenium." $RET
12 ls -la /tmp
13 cd ${tmpDIR}
14 ls -laR
15 find . -name "*.png" -exec bash -c 'echo ""; echo {}; echo ""; base64 -w 0 {}' \;
16 cd $initPWD
17 #rm -rf /tmp/tests/*
18 #exit $RET
19fi
20
21docker run -t -v /dev/shm:/dev/shm -v ${tmpDIR}:/tmp/tests:rw -v $(pwd)/TVWeb/Selenium:/usr/local/Selenium --add-host="flaskdock:$IPFlask" --name selenium --rm joyzoursky/python-chromedriver:3.7-alpine3.8-selenium python3 /usr/local/Selenium/test_gui.py > ${tmpDIR}/test_gui.log
22RET=$?
23cat ${tmpDIR}/test_gui.log
24if [ $RET -gt 0 ]; then
25 echo "Error for GRID tests with Selenium." $RET
26 ls -la /tmp
27 cd ${tmpDIR}
28 ls -laR
29 find . -name "*.png" -exec bash -c 'echo ""; echo {}; echo ""; base64 -w 0 {}' \;
30 cd $initPWD
31 #exit $RET
32fi
33ls -laR ${tmpDIR}
34
35#docker run -t -v /dev/shm:/dev/shm -v ${tmpDIR}:/tmp/tests:rw -v $(pwd)/TVWeb/Selenium:/usr/local/Selenium --add-host="flaskdock:$IPFlask" --name selenium --rm joyzoursky/python-chromedriver:3.7-alpine3.8-selenium ls -la /usr/local/Selenium
36