Skip to content

Commit c5a7478

Browse files
committed
Added into seleniumbender two more options.
- staging: for tests that run into staging - noplugin: for tests that do not require plugin installed
1 parent 626a6cb commit c5a7478

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

bin/seleniumbender

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ common=0
1616
libraries=0
1717
examples=0
1818
sketches=0
19+
staging=0
20+
noplugin=0
1921

2022
while true; do
2123
case "$1" in
@@ -36,6 +38,10 @@ while true; do
3638
;;
3739
sketches) sketches=1
3840
;;
41+
staging) staging=1
42+
;;
43+
noplugin) noplugin=1
44+
;;
3945
-*) echo -e "error: unknown argument: ${1}.\nRun ${app_name} -h."
4046
exit 1
4147
;;
@@ -48,6 +54,7 @@ done
4854
cd ..
4955

5056
URL="https://codebender.cc"
57+
URL_STAGING="https://staging.codebender.cc"
5158
SOURCE="codebender_cc"
5259

5360
email_date=$(date +"%Y-%m-%d %H:%M:%S")
@@ -69,6 +76,18 @@ elif [ "${libraries}" -eq 1 ]; then
6976
elif [ "${sketches}" -eq 1 ]; then
7077
IDENTIFIER="cb_compile_tester"
7178
tox tests/compile_tester -- --url=${URL} --source=${SOURCE} -F --plugin
79+
elif [ "${staging}" -eq 1 ]; then
80+
IDENTIFIER="cb_compile_tester_staging"
81+
tox tests/compile_tester -- --url=${URL_STAGING} --source=${SOURCE} -F --plugin
82+
exit $?
83+
elif [ "${noplugin}" -eq 1 ]; then
84+
IDENTIFIER="noplugin"
85+
tox tests/noplugin -- --url=${URL} --source=${SOURCE}
86+
RETVAL=$?
87+
if [ "${RETVAL}" -eq 1 ]; then
88+
mail -s "Selenium Tests: ${IDENTIFIER} Failed To Run" [email protected] <<< 'Something went wrong with noplugin tests. Please check the logs.'
89+
exit ${RETVAL}
90+
fi
7291
fi
7392

7493
DATE=$(date +"%Y-%m-%d") # Get the current date

0 commit comments

Comments
 (0)