Commit fe67bdc2 authored by Eugene Venter's avatar Eugene Venter
Browse files

test/behat/mahara_behat.sh: put back xvfb

script now checks for a 'headless' argument, then uses xvfb
functionality ;)

Change-Id: Id646d305994d0278aba8262cec97151691b94472
parent e3773f5f
......@@ -34,7 +34,7 @@ then
PERFORM=$2
php htdocs/testing/frameworks/behat/cli/util.php --$PERFORM
elif [ "$ACTION" = "run" ]
elif [ "$ACTION" = "run" -o "$ACTION" = "runheadless" ]
then
# Initialise the behat environment
......@@ -61,8 +61,17 @@ then
echo "Downloaded"
fi
java -jar $SELENIUM_PATH &> /dev/null &
sleep 5
if [[ $ACTION == 'runheadless' ]]
then
# we want to run selenium headless on a different display - this allows for that ;)
echo "Starting Xvfb ..."
Xvfb :10 -ac > /dev/null 2>&1 & echo "PID [$!]"
DISPLAY=:10 nohup java -jar $SELENIUM_PATH > /dev/null 2>&1 & echo $!
else
java -jar $SELENIUM_PATH &> /dev/null &
fi
sleep 15 # wait for selenium to initialise properly
if is_selenium_running; then
echo "Selenium started"
......
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