[Fusionforge-commits] r12989 - trunk/tests/scripts

Christian Bayle cbayle at fusionforge.org
Sat Apr 2 11:50:16 CEST 2011


Author: cbayle
Date: 2011-04-02 11:50:16 +0200 (Sat, 02 Apr 2011)
New Revision: 12989

Modified:
   trunk/tests/scripts/fusionforge-build-and-test-rpm.sh
Log:
handle phpunit return code


Modified: trunk/tests/scripts/fusionforge-build-and-test-rpm.sh
===================================================================
--- trunk/tests/scripts/fusionforge-build-and-test-rpm.sh	2011-04-02 08:46:30 UTC (rev 12988)
+++ trunk/tests/scripts/fusionforge-build-and-test-rpm.sh	2011-04-02 09:50:16 UTC (rev 12989)
@@ -92,13 +92,14 @@
 # ssh root@".HOST." 'perl -spi -e s#/usr/sbin/sendmail#/usr/share/tests/scripts/catch_mail.php# /etc/gforge/local.inc'
 ssh root@$HOST "service crond stop" || true
 
+retcode=0
 if $REMOTESELENIUM
 then
 	echo "Run phpunit test on $HOST"
 	ssh -X root@$HOST "tests/scripts/phpunit.sh RPMCentos52Tests.php"
 else
 	cd tests
-	phpunit --log-junit $WORKSPACE/reports/phpunit-selenium.xml RPMCentos52Tests.php
+	phpunit --log-junit $WORKSPACE/reports/phpunit-selenium.xml RPMCentos52Tests.php || retcode=1
 	cd ..
 	if [ "x$SELENIUM_RC_DIR" != "x" ]
 	then
@@ -113,4 +114,4 @@
 else
 	(cd tests/scripts ; sh ./stop_vm.sh $HOST)
 fi
-
+exit $retcode




More information about the Fusionforge-commits mailing list