-
Notifications
You must be signed in to change notification settings - Fork 399
/
Copy pathrun-suite.sh
executable file
·34 lines (29 loc) · 915 Bytes
/
run-suite.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
SELENIUM_SERVER=../selenium/selenium-server-standalone-2.0rc2.jar
echo Setting up screenshot directory...
mkdir -p /tmp/screenshots
rm /tmp/screenshots/*
echo Bootstrapping...
php ../server/cleanup.php >log/bootstrap.log
php ../server/settings.php >log/bootstrap.log
php ../server/submit.php >>log/bootstrap.log
php ../server/apsearch.php >>log/bootstrap.log
if (ps -ef | grep -q "selenium-server.*jar$"); then
echo Selenium Server already running:
ps -ef | grep "selenium-server.*jar$"
else
echo -n "Launching Selenium Server (this can take over a minute)"
java -jar $SELENIUM_SERVER >log/selenium.log &
while :; do
echo -n .
sleep 1
tail -1 log/selenium.log
if (tail -1 log/selenium.log | grep -q 'Started org.openqa.jetty.jetty.Server'); then
break
fi
done
fi
phpunit --verbose .
echo Cleaning up...
php ../server/cleanup.php >>log/bootstrap.log
echo Done.