[Qa-jenkins-scm] [jenkins.debian.net] 01/01: use xvfb and schroot nicely together

Holger Levsen holger at moszumanska.debian.org
Sat Nov 14 16:16:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit cbe53dd555d142ff81b4c47ba4f5325cc9c1456b
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sat Nov 14 17:16:38 2015 +0100

    use xvfb and schroot nicely together
---
 bin/test_torbrowser-launcher.sh | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/bin/test_torbrowser-launcher.sh b/bin/test_torbrowser-launcher.sh
index 0a2698f..636dea2 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
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list