summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-11-14 17:16:38 +0100
committerHolger Levsen <holger@layer-acht.org>2015-11-14 17:16:38 +0100
commitcbe53dd555d142ff81b4c47ba4f5325cc9c1456b (patch)
tree43694bf95e96a9644a22cad78b86b18cbfd1cca2
parenta39b3bdea39f0ff22226e903835f6d54e69553d5 (diff)
downloadjenkins.debian.net-cbe53dd555d142ff81b4c47ba4f5325cc9c1456b.tar.xz
use xvfb and schroot nicely together
-rwxr-xr-xbin/test_torbrowser-launcher.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/bin/test_torbrowser-launcher.sh b/bin/test_torbrowser-launcher.sh
index 0a2698fe..636dea20 100755
--- a/bin/test_torbrowser-launcher.sh
+++ b/bin/test_torbrowser-launcher.sh
@@ -15,6 +15,9 @@ cleanup_all() {
schroot --end-session -c tbb-launcher-$SUITE-$(basename $TMPDIR) > /dev/null 2>&1 || true
# delete main work dir
rm $TMPDIR -r
+ # kill xvfb
+ kill $XPID
+ # end
echo "$(date -u) - $TMPDIR deleted. Cleanup done."
}
@@ -24,8 +27,18 @@ first_test() {
schroot --begin-session --session-name=$SESSION -c jenkins-torbrowser-launcher-$SUITE
schroot --run-session -c $SESSION --directory /tmp -u root -- mkdir $HOME
schroot --run-session -c $SESSION --directory /tmp -u root -- chown jenkins:jenkins $HOME
- xvfb-run schroot --run-session -c $SESSION -- torbrowser-launcher https://www.debian.org
+ Xvfb :77 -screen 0 1024x768x16 &
+ XPID=$?
+ export DISPLAY=":77"
+ timeout -k 5m 4m schroot --run-session -c $SESSION --preserve-environment -- torbrowser-launcher https://www.debian.org &
+ sleep 2m
+ xwd -root -silent -display :77.0 | xwdtopnm > session.pnm
+ kill $XPID
schroot --end-session -c $SESSION
+ gocr session.pnm
+ pnmtojpeg session.pnm > session.jpg
+ rm session.pnm
+ echo "session.jpg should be made availble for download"
if ! "$DEBUG" ; then set +x ; fi
}