[Fusionforge-commits] r15560 - in trunk: . tests/scripts

Roland Mas lolando at fusionforge.org
Wed May 23 15:35:21 CEST 2012


Author: lolando
Date: 2012-05-23 15:35:20 +0200 (Wed, 23 May 2012)
New Revision: 15560

Modified:
   trunk/
   trunk/tests/scripts/fusionforge-build-and-test-src-deb.sh
Log:
Let's try to make the buildbot run VNC in the VM to avoid ssh-encrypting the X traffic across VMs

Modified: trunk/tests/scripts/fusionforge-build-and-test-src-deb.sh
===================================================================
--- trunk/tests/scripts/fusionforge-build-and-test-src-deb.sh	2012-05-23 13:21:33 UTC (rev 15559)
+++ trunk/tests/scripts/fusionforge-build-and-test-src-deb.sh	2012-05-23 13:35:20 UTC (rev 15560)
@@ -51,14 +51,23 @@
 # Run tests
 retcode=0
 echo "Run phpunit test on $HOST"
-if xterm -e "sh -c exit" 2>/dev/null
-then
-	ssh -X root@$HOST "$FORGE_HOME/tests/scripts/phpunit.sh DEBDebian60Tests.php" || retcode=$?
-	rsync -av root@$HOST:/var/log/ $WORKSPACE/reports/
-else
-	echo "No display is available, NOT RUNNING TESTS"
-	retcode=2
-fi
+ssh root@$HOST "apt-get 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
+fg
+echo $? > /root/phpunit.exitcode
+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)
+rsync -av root@$HOST:/var/log/ $WORKSPACE/reports/
+ssh root@$HOST "vncserver -kill :1" || retcode=$?
 
 stop_vm_if_not_keeped -t debian6 $@
 return $retcode




More information about the Fusionforge-commits mailing list