summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-11-14 20:07:05 +0100
committerHolger Levsen <holger@layer-acht.org>2015-11-14 20:07:05 +0100
commitdc7ab9724aea098a3b61d084fc06b96ef272c325 (patch)
tree0144d77840bfe3234f12090b06f033c747f96d2d /bin
parent33d1cebfc0202c84daeb934310b4553cb97f643b (diff)
downloadjenkins.debian.net-dc7ab9724aea098a3b61d084fc06b96ef272c325.tar.xz
refactor + record a video too
Diffstat (limited to 'bin')
-rwxr-xr-xbin/test_torbrowser-launcher.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/bin/test_torbrowser-launcher.sh b/bin/test_torbrowser-launcher.sh
index 5e2f1f93..f9685e1a 100755
--- a/bin/test_torbrowser-launcher.sh
+++ b/bin/test_torbrowser-launcher.sh
@@ -11,17 +11,18 @@ set -e
cleanup_all() {
set +e
+ # kill xvfb and ffmpeg
+ kill $XPID $FFMPEGPID 2>/dev/null|| true
# preserve screenshots
- [ ! -f screenshot.png ] || mv screenshot.png $WORKSPACE/ || true
- [ ! -f screenshot-thumb.png ] || mv screenshot-thumb.png $WORKSPACE/ || true
- # actual cleanup starts here
- cd
+ [ ! -f screenshot.png ] || mv screenshot.png $WORKSPACE/
+ [ ! -f screenshot-thumb.png ] || mv screenshot-thumb.png $WORKSPACE/
+ [ ! -f screenshot.png ] || mv screenshot.png $WORKSPACE/
+ [ ! -f test-torbrowser-$SUITE.mpg ] || mv test-torbrowser-$SUITE.mpg $WORKSPACE/
# delete session if it still exists
schroot --end-session -c tbb-launcher-$SUITE-$(basename $TMPDIR) > /dev/null 2>&1 || true
# delete main work dir
+ cd
rm $TMPDIR -r
- # kill xvfb
- kill $XPID 2>/dev/null|| true
# end
echo "$(date -u) - $TMPDIR deleted. Cleanup done."
}
@@ -44,12 +45,14 @@ first_test() {
XPID=$!
export DISPLAY=":$SCREEN.0"
timeout -k 12m 11m schroot --run-session -c $SESSION --preserve-environment -- torbrowser-launcher https://www.debian.org &
+ ffmpeg -f x11grab -i :$SCREEN.0 test-torbrowser-$SUITE.mpg &
+ FFMPEGPID=$!
for i in $(seq 1 6) ; do
sleep 1m
update_screenshot
done
schroot --end-session -c $SESSION
- kill $XPID || true
+ kill $XPID $FFMPEGPID || true
if ! "$DEBUG" ; then set +x ; fi
}