[Fusionforge-commits] r15667 - in branches/Branch_5_1: . tests/scripts

Roland Mas lolando at fusionforge.org
Mon Jun 4 15:52:37 CEST 2012


Author: lolando
Date: 2012-06-04 15:52:36 +0200 (Mon, 04 Jun 2012)
New Revision: 15667

Modified:
   branches/Branch_5_1/
   branches/Branch_5_1/tests/scripts/fusionforge-build-and-test-deb.sh
   branches/Branch_5_1/tests/scripts/fusionforge-build-and-test-rpm.sh
   branches/Branch_5_1/tests/scripts/fusionforge-build-and-test-src-cos.sh
Log:
Backport from 5.2/trunk: run VNC within the VMs on the buildbot

Modified: branches/Branch_5_1/tests/scripts/fusionforge-build-and-test-deb.sh
===================================================================
--- branches/Branch_5_1/tests/scripts/fusionforge-build-and-test-deb.sh	2012-06-03 20:20:43 UTC (rev 15666)
+++ branches/Branch_5_1/tests/scripts/fusionforge-build-and-test-deb.sh	2012-06-04 13:52:36 UTC (rev 15667)
@@ -122,7 +122,26 @@
 if $REMOTESELENIUM
 then
 	echo "Run phpunit test on $HOST"
-	ssh -X root@$HOST "tests/scripts/phpunit.sh DEBDebian60Tests.php" || retcode=$?
+	ssh root@$HOST "apt-get -y install vnc4server ; mkdir -p /root/.vnc"
+	ssh root@$HOST "cat > /root/.vnc/xstartup ; chmod +x /root/.vnc/xstartup" <<EOF
+#! /bin/bash
+: > /root/phpunit.exitcode
+$FORGE_HOME/tests/scripts/phpunit.sh DEBDebian60Tests.php &> /var/log/phpunit.log &
+echo \$! > /root/phpunit.pid
+wait %1
+echo \$? > /root/phpunit.exitcode
+EOF
+	ssh root@$HOST vncpasswd <<EOF
+password
+password
+EOF
+	ssh root@$HOST "vncserver :1"
+	sleep 5
+	pid=$(ssh root@$HOST cat /root/phpunit.pid)
+	ssh root@$HOST "tail -f /var/log/phpunit.log --pid=$pid"
+	sleep 5
+	retcode=$(ssh root@$HOST cat /root/phpunit.exitcode)
+	ssh root@$HOST "vncserver -kill :1" || retcode=$?
 else
 	cd tests
 	phpunit --log-junit $WORKSPACE/reports/phpunit-selenium.xml DEBDebian60Tests.php || retcode=$?

Modified: branches/Branch_5_1/tests/scripts/fusionforge-build-and-test-rpm.sh
===================================================================
--- branches/Branch_5_1/tests/scripts/fusionforge-build-and-test-rpm.sh	2012-06-03 20:20:43 UTC (rev 15666)
+++ branches/Branch_5_1/tests/scripts/fusionforge-build-and-test-rpm.sh	2012-06-04 13:52:36 UTC (rev 15667)
@@ -119,7 +119,26 @@
 if $REMOTESELENIUM
 then
 	echo "Run phpunit test on $HOST"
-	ssh -X root@$HOST "tests/scripts/phpunit.sh RPMCentos52Tests.php"|| retcode=$?
+	ssh root@$HOST "yum install -y vnc-server ; mkdir -p /root/.vnc"
+	ssh root@$HOST "cat > /root/.vnc/xstartup ; chmod +x /root/.vnc/xstartup" <<EOF
+#! /bin/bash
+: > /root/phpunit.exitcode
+$FORGE_HOME/tests/scripts/phpunit.sh RPMCentos52Tests.php &> /var/log/phpunit.log &
+echo \$! > /root/phpunit.pid
+wait %1
+echo \$? > /root/phpunit.exitcode
+EOF
+	ssh root@$HOST vncpasswd <<EOF
+password
+password
+EOF
+	ssh root@$HOST "vncserver :1"
+	sleep 5
+	pid=$(ssh root@$HOST cat /root/phpunit.pid)
+	ssh root@$HOST "tail -f /var/log/phpunit.log --pid=$pid"
+	sleep 5
+	retcode=$(ssh root@$HOST cat /root/phpunit.exitcode)
+	ssh root@$HOST "vncserver -kill :1" || retcode=$?
 else
 	cd tests
 	phpunit --log-junit $WORKSPACE/reports/phpunit-selenium.xml RPMCentos52Tests.php || retcode=$?

Modified: branches/Branch_5_1/tests/scripts/fusionforge-build-and-test-src-cos.sh
===================================================================
--- branches/Branch_5_1/tests/scripts/fusionforge-build-and-test-src-cos.sh	2012-06-03 20:20:43 UTC (rev 15666)
+++ branches/Branch_5_1/tests/scripts/fusionforge-build-and-test-src-cos.sh	2012-06-04 13:52:36 UTC (rev 15667)
@@ -133,7 +133,26 @@
 echo "Run phpunit test on $HOST"
 if xterm -e "sh -c exit" 2>/dev/null
 then
-	ssh -X root@$HOST "cd /root; ./tests/scripts/phpunit.sh TarCentos52Tests.php" || retcode=$?
+	ssh root@$HOST "yum install -y vnc-server ; mkdir -p /root/.vnc"
+	ssh root@$HOST "cat > /root/.vnc/xstartup ; chmod +x /root/.vnc/xstartup" <<EOF
+#! /bin/bash
+: > /root/phpunit.exitcode
+$FORGE_HOME/tests/scripts/phpunit.sh TarCentos52Tests.php &> /var/log/phpunit.log &
+echo \$! > /root/phpunit.pid
+wait %1
+echo \$? > /root/phpunit.exitcode
+EOF
+	ssh root@$HOST vncpasswd <<EOF
+password
+password
+EOF
+	ssh root@$HOST "vncserver :1"
+	sleep 5
+	pid=$(ssh root@$HOST cat /root/phpunit.pid)
+	ssh root@$HOST "tail -f /var/log/phpunit.log --pid=$pid"
+	sleep 5
+	retcode=$(ssh root@$HOST cat /root/phpunit.exitcode)
+	ssh root@$HOST "vncserver -kill :1" || retcode=$?
 else
 	echo "No display is available, NOT RUNNING TESTS"
 	retcode=2




More information about the Fusionforge-commits mailing list