diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-11-14 18:36:36 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-11-14 18:36:36 +0100 |
commit | b792a84a1443eeae327f9851720d81d5a82bd83a (patch) | |
tree | 829f8f9f3565897cd0e6239045945a74973521b8 /bin | |
parent | 994309ef62ff2ff3473dd6c0cebec2649a871276 (diff) | |
download | jenkins.debian.net-b792a84a1443eeae327f9851720d81d5a82bd83a.tar.xz |
refactor
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/test_torbrowser-launcher.sh | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/bin/test_torbrowser-launcher.sh b/bin/test_torbrowser-launcher.sh index 9fb07273..4768308d 100755 --- a/bin/test_torbrowser-launcher.sh +++ b/bin/test_torbrowser-launcher.sh @@ -22,6 +22,13 @@ cleanup_all() { echo "$(date -u) - $TMPDIR deleted. Cleanup done." } +update_screenshot() { + 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 +} + first_test() { set -x local SESSION="tbb-launcher-$SUITE-$(basename $TMPDIR)" @@ -33,13 +40,12 @@ first_test() { XPID=$! export DISPLAY=":$SCREEN.0" timeout -k 12m 11m schroot --run-session -c $SESSION --preserve-environment -- torbrowser-launcher https://www.debian.org & - sleep 2m - xwd -root -silent -display :$SCREEN.0 | xwdtopnm > screenshot.pnm - sleep 2m + for i in $(seq 1 6) ; do + sleep 1m + update_screenshot + done kill $XPID - schroot --end-screenshot -c $SESSION - pnmtopng screenshot.pnm > screenshot.png - convert screenshot.png -adaptive-resize 128x96 screenshot-thumb.png + schroot --end-session -c $SESSION if ! "$DEBUG" ; then set +x ; fi } |