[Qa-jenkins-scm] [jenkins.debian.net] 01/01: torbrowser tests: new test: download via tor

Holger Levsen holger at moszumanska.debian.org
Mon Jan 25 18:51:08 UTC 2016


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 94acffdc54f4748be09a110c5f4c7551a08a5907
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon Jan 25 19:50:57 2016 +0100

    torbrowser tests: new test: download via tor
---
 bin/test_torbrowser-launcher.sh  | 20 ++++++++++++++++++++
 job-cfg/torbrowser-launcher.yaml |  4 ++--
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/bin/test_torbrowser-launcher.sh b/bin/test_torbrowser-launcher.sh
index 4d27a96..c9eebc2 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
diff --git a/job-cfg/torbrowser-launcher.yaml b/job-cfg/torbrowser-launcher.yaml
index b3d0cd9..fa61bc0 100644
--- a/job-cfg/torbrowser-launcher.yaml
+++ b/job-cfg/torbrowser-launcher.yaml
@@ -200,8 +200,8 @@
                                         dist: jessie,   my_hour: 4 }
               - 'debian_jessie':       { my_gitbranch: 'debian/jessie',
                                         dist: jessie,   my_hour: 4 }
-              - 'debian_sid_with_broken_settings': { my_gitbranch: 'debian/sid',
-                                        my_opt_arg: ' broken_settings', my_opt_desc: ' with a broken user configuration',
+              - 'debian_sid_via_tor':  { my_gitbranch: 'debian/sid',
+                                        my_opt_arg: ' via_tor', my_opt_desc: ' download via tor',
                                         dist: jessie,   my_hour: 4 }
               - 'debian_jessie_with_broken_settings': { my_gitbranch: 'debian/jessie',
                                         my_opt_arg: ' broken_settings', my_opt_desc: ' with a broken user configuration',

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