From ce64f8d288ffe9415e2140c7f505eadcef527397 Mon Sep 17 00:00:00 2001 From: Roland Mas Date: Thu, 24 May 2012 10:04:52 +0000 Subject: [PATCH] Backport from trunk: run VNC within the VM on the buildbot for Debian jobs --- .../scripts/fusionforge-build-and-test-deb.sh | 30 ++++++++++++++----- .../fusionforge-build-and-test-src-deb.sh | 30 ++++++++++++++----- 2 files changed, 44 insertions(+), 16 deletions(-) diff --git a/tests/scripts/fusionforge-build-and-test-deb.sh b/tests/scripts/fusionforge-build-and-test-deb.sh index ab1ba739d3..fc4443efad 100755 --- a/tests/scripts/fusionforge-build-and-test-deb.sh +++ b/tests/scripts/fusionforge-build-and-test-deb.sh @@ -56,14 +56,28 @@ EOF # Run tests retcode=0 echo "Run phpunit test on $HOST in $FORGE_HOME" -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 -y install vnc4server ; mkdir -p /root/.vnc" +ssh root@$HOST "cat > /root/.vnc/xstartup ; chmod +x /root/.vnc/xstartup" < /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 </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 -y install vnc4server ; mkdir -p /root/.vnc" +ssh root@$HOST "cat > /root/.vnc/xstartup ; chmod +x /root/.vnc/xstartup" < /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 <