diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-11-15 15:45:31 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-11-15 15:45:31 +0100 |
commit | 239bba3e46bb3e273b7abea992b61813bf1ed069 (patch) | |
tree | bae49f387ad18e9c2d20fd01a57940aaece95df0 | |
parent | b490e55a68f940a0cc50a7e89930b4bea72df989 (diff) | |
download | jenkins.debian.net-239bba3e46bb3e273b7abea992b61813bf1ed069.tar.xz |
torbrowser tests: save several screenshots
-rwxr-xr-x | bin/test_torbrowser-launcher.sh | 12 | ||||
-rw-r--r-- | 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 4a7e1d07..7739e689 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 3f475ca2..6b812949 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: |