[Fusionforge-commits] FusionForge branch Branch_5_3 updated. 30dae1bcaa87f3265ef29d531ae7e66b9a8f5af4
Roland Mas
lolando at fusionforge.org
Tue Aug 12 09:52:14 CEST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, Branch_5_3 has been updated
via 30dae1bcaa87f3265ef29d531ae7e66b9a8f5af4 (commit)
from e39da791343d5db729e980b04eb1dc88ba8c5352 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 30dae1bcaa87f3265ef29d531ae7e66b9a8f5af4
Author: Roland Mas <lolando at debian.org>
Date: Tue Aug 12 09:52:06 2014 +0200
Better handling of Selenium timeout
diff --git a/tests/scripts/phpunit.sh b/tests/scripts/phpunit.sh
index d9c2763..3a6a692 100755
--- a/tests/scripts/phpunit.sh
+++ b/tests/scripts/phpunit.sh
@@ -96,15 +96,33 @@ EOF
echo "Starting Selenium"
killall -9 java
-PATH=/usr/lib/iceweasel:$PATH LANG=C java -jar /usr/share/selenium/selenium-server.jar -trustAllSSLCertificates -singleWindow >/dev/null &
-i=0
+t=$(mktemp)
timeout=200
+PATH=/usr/lib/iceweasel:$PATH LANG=C java -jar /usr/share/selenium/selenium-server.jar -trustAllSSLCertificates -singleWindow > $t 2>&1 &
+i=0
+while [ $i -lt $timeout ] && ! netstat -tnl 2>/dev/null | grep -q :4444 ; do
+ sleep 1
+ i=$(($i+1))
+done
+if [ $i = $timeout ] ; then
+ echo "Selenium failed to start within $timeout seconds:"
+ echo -----
+ cat $t
+ echo -----
+ echo "Trying again."
+fi
+PATH=/usr/lib/iceweasel:$PATH LANG=C java -jar /usr/share/selenium/selenium-server.jar -trustAllSSLCertificates -singleWindow > $t 2>&1 &
+i=0
while [ $i -lt $timeout ] && ! netstat -tnl 2>/dev/null | grep -q :4444 ; do
sleep 1
i=$(($i+1))
done
if [ $i = $timeout ] ; then
- echo "Selenium failed to start within $timeout seconds"
+ echo "Selenium failed to start within $timeout seconds:"
+ echo -----
+ cat $t
+ echo -----
+ echo "Giving up."
exit 1
fi
-----------------------------------------------------------------------
Summary of changes:
tests/scripts/phpunit.sh | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
hooks/post-receive
--
FusionForge
More information about the Fusionforge-commits
mailing list