Commit d5d3d3ef authored by Ryan Herbert's avatar Ryan Herbert

launch_functional_tests reset database before each browser

parent 04173523
Pipeline #33472 failed with stages
in 5 minutes and 22 seconds
../../../../../browser/test/launch_functional_tests
\ No newline at end of file
# sh launch_functional_tests functional/test_*rb
FUNCTIONAL_TESTS=$*
rename_reports_in() {
dir="$1"
b="$2"
if [ "$b" = "." ]; then
b="default"
else
b=$(echo "$b" | tr '/' '-')
fi
for file in $1/*.xml; do
filename=$(basename -s .xml $file)
mv $file $dir/$filename-$b.xml
done
}
rm -f test/*.xml
EXIT=0
if [ -z "$FUNCTIONAL_CLIENT_BROWSER_PATH" ]; then
FUNCTIONAL_CLIENT_BROWSER_PATH="."
fi
for browser in $FUNCTIONAL_CLIENT_BROWSER_PATH; do
python ../../../web2py.py -M -S vidjil -R applications/vidjil/tests/functional/init_test_db.py
for file in $FUNCTIONAL_TESTS; do
if [ ${#browser} -gt 1 ]; then
export WATIR_BROWSER_PATH="$browser"
fi
ruby -I functional $file;
TMP_EXIT=$?
if [ $TMP_EXIT -ne 0 ]; then
EXIT=$TMP_EXIT
fi
rename_reports_in test/reports/ "$browser"
mv test/reports/*.xml test/
done
done
exit $EXIT
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment