summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2016-01-25 19:50:57 +0100
committerHolger Levsen <holger@layer-acht.org>2016-01-25 19:50:57 +0100
commit94acffdc54f4748be09a110c5f4c7551a08a5907 (patch)
treed16000118f5f729018cd0a8bed9462e46de479d7 /bin
parent87b85ab47b525e944a8d3dc3fb58950ae95e70c2 (diff)
downloadjenkins.debian.net-94acffdc54f4748be09a110c5f4c7551a08a5907.tar.xz
torbrowser tests: new test: download via tor
Diffstat (limited to 'bin')
-rwxr-xr-xbin/test_torbrowser-launcher.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/test_torbrowser-launcher.sh b/bin/test_torbrowser-launcher.sh
index 4d27a96f..c9eebc20 100755
--- a/bin/test_torbrowser-launcher.sh
+++ b/bin/test_torbrowser-launcher.sh
@@ -148,6 +148,14 @@ announce_problem_and_abort_silently() {
exit 0
}
+prepare_other_packages() {
+ if $VIA_TOR ; then
+ schroot --run-session -c $SESSION --directory $TMPDIR -u root -- apt-get install -y tor
+ else
+ schroot --run-session -c $SESSION --directory $TMPDIR -u root -- apt-get install -y ca-certificates
+ fi
+}
+
prepare_lauchner_settings() {
if $BROKEN_SETTINGS ; then
echo "$(date -u ) - providing broken settings for torbrowser-launcher to test if it can deal with it."
@@ -238,6 +246,11 @@ download_and_launch() {
( timeout -k 30m 29m schroot --run-session -c $SESSION --preserve-environment -- /usr/bin/torbrowser-launcher --settings 2>&1 |& tee $TBL_LOGFILE || true ) &
sleep 20
update_screenshot
+ if $VIA_TOR ; then
+ # download via tor
+ echo "$(date -u) - pressing <space>"
+ xvkbd -text "\[space]" > /dev/null 2>&1
+ fi
echo "$(date -u) - pressing <tab>"
xvkbd -text "\t" > /dev/null 2>&1
sleep 1
@@ -438,6 +451,12 @@ elif [ "$1" = "broken_settings" ] ; then
else
BROKEN_SETTINGS=false
fi
+if [ "$1" = "via_tor" ] ; then
+ VIA_TOR=true
+ shift
+else
+ VIA_TOR=false
+fi
SUITE=$1
UPGRADE_SUITE=""
TMPDIR=$(mktemp -d -t torbrowser-launcher-XXXXXX)
@@ -491,6 +510,7 @@ if [ "$2" = "git" ] ; then
elif [ -n "$UPGRADE_SUITE" ] ; then
upgrade_to_newer_packaged_version_in $UPGRADE_SUITE
fi
+prepare_other_packages
download_and_launch
end_session
cleanup_duplicate_screenshots