[Qa-jenkins-scm] [jenkins.debian.net] 02/04: torbrowser tests: save several screenshots

Holger Levsen holger at moszumanska.debian.org
Sun Nov 15 14:47:02 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 239bba3e46bb3e273b7abea992b61813bf1ed069
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sun Nov 15 15:45:31 2015 +0100

    torbrowser tests: save several screenshots
---
 bin/test_torbrowser-launcher.sh  | 12 ++++++++----
 job-cfg/torbrowser-launcher.yaml |  4 ++++
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/bin/test_torbrowser-launcher.sh b/bin/test_torbrowser-launcher.sh
index 4a7e1d0..7739e68 100755
--- a/bin/test_torbrowser-launcher.sh
+++ b/bin/test_torbrowser-launcher.sh
@@ -14,9 +14,9 @@ cleanup_all() {
 	# kill xvfb and ffmpeg
 	kill $XPID $FFMPEGPID 2>/dev/null|| true
 	# preserve screenshots
-	[ ! -f screenshot.png ] || mv screenshot.png $WORKSPACE/
-	[ ! -f screenshot-thumb.png ] || mv screenshot-thumb.png $WORKSPACE/
-	[ ! -f test-torbrowser-$SUITE.mpg ] || mv test-torbrowser-$SUITE.mpg $WORKSPACE/
+	[ ! -f screenshot.png ] || mv screenshot.png $RESULTS/
+	[ ! -f screenshot-thumb.png ] || mv screenshot-thumb.png $RESULTS/
+	[ ! -f test-torbrowser-$SUITE.mpg ] || mv test-torbrowser-$SUITE.mpg $RESULTS/
 	# delete session if it still exists
 	schroot --end-session -c tbb-launcher-$SUITE-$(basename $TMPDIR) > /dev/null 2>&1 || true
 	# delete main work dir
@@ -27,10 +27,12 @@ cleanup_all() {
 }
 
 update_screenshot() {
+	TIMESTAMP=$(date +%Y%m%d%H%M)
 	xwd -root -silent -display :$SCREEN.0 | xwdtopnm > screenshot.pnm
 	pnmtopng screenshot.pnm > screenshot.png
 	convert screenshot.png -adaptive-resize 128x96 screenshot-thumb.png
-	mv screenshot.png screenshot-thumb.png $WORKSPACE/ || true
+	cp screenshot.png $RESULTS/screenshot_$TIMESTAMP.png
+	mv screenshot.png screenshot-thumb.png $RESULTS/
 }
 
 first_test() {
@@ -68,6 +70,8 @@ first_test() {
 TMPDIR=$(mktemp -d)  # where everything actually happens
 trap cleanup_all INT TERM EXIT
 WORKSPACE=$(pwd)
+mkdir -p results
+RESULTS=$WORKSPACE/results
 cd $TMPDIR
 
 SUITE=$1
diff --git a/job-cfg/torbrowser-launcher.yaml b/job-cfg/torbrowser-launcher.yaml
index 3f475ca..6b81294 100644
--- a/job-cfg/torbrowser-launcher.yaml
+++ b/job-cfg/torbrowser-launcher.yaml
@@ -65,6 +65,10 @@
           parse-rules: '/srv/jenkins/logparse/torbrowser-launcher.rules'
           unstable-on-warning: 'true'
           fail-on-error: 'true'
+      - imagegallery:
+          title: '{my_title}'
+          includes: 'results/*.png'
+          image-width: 300
       - email:
           recipients: '{my_recipients}'
     wrappers:

-- 
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