summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-11-16 02:14:51 +0100
committerHolger Levsen <holger@layer-acht.org>2015-11-16 02:16:12 +0100
commit7517808c01ae43ac4712f4a23ec72136bb0c11d3 (patch)
tree313a389220c2a348847e28c201b9058b20801f4a
parent6494be1d523fa914ccce1b82ed7d8c9b5cd671ef (diff)
downloadjenkins.debian.net-7517808c01ae43ac4712f4a23ec72136bb0c11d3.tar.xz
torbrowser tests: two new jobs: build package from git and use the one from experimental on jessie
-rw-r--r--TODO2
-rwxr-xr-xbin/test_torbrowser-launcher.sh45
-rw-r--r--job-cfg/torbrowser-launcher.yaml93
3 files changed, 111 insertions, 29 deletions
diff --git a/TODO b/TODO
index 408fbc02..4bc6bf00 100644
--- a/TODO
+++ b/TODO
@@ -411,8 +411,6 @@ The following ideas should really only be implemented for the new 'lvc*' tests..
=== torbrowser-launcher_*
-* also build package from git and test that
-** provide branch as $2
* not sure how to test updates. maybe just run in yesterdays schroot before upgrading
* test with python-pygame installed too?
* run this in qemu and enable apparmor too?
diff --git a/bin/test_torbrowser-launcher.sh b/bin/test_torbrowser-launcher.sh
index 11dc823f..9a835600 100755
--- a/bin/test_torbrowser-launcher.sh
+++ b/bin/test_torbrowser-launcher.sh
@@ -62,16 +62,23 @@ end_session() {
}
upgrade_to_experimental_version() {
- if [ "$SUITE" != "experimental" ] ; then
- return
- fi
echo
- echo "Upgrading to torbrowser-launcher from experimental…"
+ echo "$(date -u ) - upgrading to torbrowser-launcher from experimental…"
echo "deb $MIRROR experimental main contrib" | schroot --run-session -c $SESSION --directory /tmp -u root -- tee -a /etc/apt/sources.list
schroot --run-session -c $SESSION --directory /tmp -u root -- apt-get update
schroot --run-session -c $SESSION --directory /tmp -u root -- apt-get -y install -t experimental torbrowser-launcher
}
+build_and_upgrade_to_git_version() {
+ echo
+ echo "$(date -u ) - building torbrowser-launcher from git, branch $BRANCH…"
+ schroot --run-session -c $SESSION --directory $TMPDIR/git -- debuild -b
+ DEB=$(cd $TMPDIR/git ; ls torbrowser-launcher_*deb)
+ echo "$(date -u ) - installing $DEB…"
+ schroot --run-session -c $SESSION --directory $TMPDIR/git -u root -- dpkg -i $DEB
+ rm $TMPDIR/git -r
+}
+
download_and_launch() {
echo
echo "$(date -u) - Test download_and_launch begins."
@@ -176,7 +183,7 @@ download_and_launch() {
}
#
-# main
+# prepare
#
if [ -z "$1" ] ; then
echo "call $0 with a suite as param."
@@ -185,20 +192,40 @@ fi
SUITE=$1
TMPDIR=$(mktemp -d) # where everything actually happens
SESSION="tbb-launcher-$SUITE-$(basename $TMPDIR)"
+STARTTIME=$(date +%Y%m%d%H%M)
+VIDEO=test-torbrowser-${SUITE}_$STARTTIME.mpg
+SIZE=1024x768
SCREEN=$EXECUTOR_NUMBER
+if [ "$2" = "git" ] ; then
+ if [ -z "$3" ] ; then
+ BRANCH=master
+ else
+ BRANCH=$3
+ fi
+ echo "$(date -u) - preserving git workspace."
+ git branch -av
+ mkdir $TMPDIR/git
+ cp -r * $TMPDIR/git
+elif [ "$SUITE" = "experimental" ] || [ "$2" = "experimental" ] ; then
+ EXPERIMENTAL=yes
+fi
WORKSPACE=$(pwd)
RESULTS=$WORKSPACE/results
[ ! -f screenshot.png ] || mv screenshot.png screenshot_from_git.png
mkdir -p $RESULTS
cd $TMPDIR
-STARTTIME=$(date +%Y%m%d%H%M)
-VIDEO=test-torbrowser-${SUITE}_$STARTTIME.mpg
-SIZE=1024x768
trap cleanup_all INT TERM EXIT
+#
+# main
+#
echo "$(date -u) - testing torbrowser-launcher on $SUITE now."
begin_session
-upgrade_to_experimental_version
+if [ "$2" = "git" ] ; then
+ build_and_upgrade_to_git_version
+elif [ "$EXPERIMENTAL" = "yes" ] ; then
+ upgrade_to_experimental_version
+fi
download_and_launch
end_session
diff --git a/job-cfg/torbrowser-launcher.yaml b/job-cfg/torbrowser-launcher.yaml
index 26198872..860c000e 100644
--- a/job-cfg/torbrowser-launcher.yaml
+++ b/job-cfg/torbrowser-launcher.yaml
@@ -1,5 +1,5 @@
- defaults:
- name: torbrowser-launcher
+ name: torbrowser-launcher_setup
project-type: freestyle
triggers:
- timed: '{my_timed}'
@@ -37,7 +37,6 @@
name: torbrowser-launcher_git
project-type: freestyle
triggers:
- - timed: '{my_timed}'
- pollscm: '*/6 * * * *'
properties:
- sidebar:
@@ -59,7 +58,7 @@
artifactDaysToKeep: -1
artifactNumToKeep: -1
builders:
- - shell: '{my_shell}'
+ - shell: '{my_shell} {my_gitbranch}'
publishers:
- logparser:
parse-rules: '/srv/jenkins/logparse/torbrowser-launcher.rules'
@@ -80,84 +79,142 @@
- git:
url: '{my_gitrepo}'
branches:
- - master
+ - '{my_gitbranch}'
+ node: '{my_node}'
+
+- defaults:
+ name: torbrowser-launcher_packages
+ project-type: freestyle
+ triggers:
+ - timed: '{my_timed}'
+ properties:
+ - sidebar:
+ url: https://jenkins.debian.net/userContent/about.html
+ text: About jenkins.debian.net
+ icon: /userContent/images/debian-swirl-24x24.png
+ - sidebar:
+ url: https://jenkins.debian.net/view/torbrowser-launcher
+ text: torbrowser-launcher jobs
+ icon: /userContent/images/debian-jenkins-24x24.png
+ - sidebar:
+ url: http://www.profitbricks.co.uk
+ text: Sponsored by Profitbricks
+ icon: /userContent/images/profitbricks-24x24.png
+ description: '{my_description}<br>Job configuration source is <a href="http://anonscm.debian.org/cgit/qa/jenkins.debian.net.git/tree/job-cfg/torbrowser-launcher.yaml">torbrowser-launcher.yaml</a>.<br>Results are available at <a href="https://torbrowser-launcher.debian.net/">https://torbrowser-launcher.debian.net</a>.'
+ logrotate:
+ daysToKeep: 90
+ numToKeep: 20
+ artifactDaysToKeep: -1
+ artifactNumToKeep: -1
+ builders:
+ - shell: '{my_shell}'
+ publishers:
+ - logparser:
+ parse-rules: '/srv/jenkins/logparse/torbrowser-launcher.rules'
+ unstable-on-warning: 'true'
+ fail-on-error: 'true'
+ - archive:
+ artifacts: 'results/*.*'
+ latest_only: false
+ - imagegallery:
+ title: '{my_description}'
+ includes: 'results/*.png'
+ image-width: 300
+ - email:
+ recipients: '{my_recipients}'
+ wrappers:
+ - live-screenshot
node: '{my_node}'
+
- job-template:
- defaults: torbrowser-launcher
+ defaults: torbrowser-launcher_setup
name: '{name}_setup_schroot_unstable_amd64'
- job-template:
- defaults: torbrowser-launcher
+ defaults: torbrowser-launcher_setup
name: '{name}_setup_schroot_stretch_amd64'
- job-template:
- defaults: torbrowser-launcher
+ defaults: torbrowser-launcher_setup
name: '{name}_setup_schroot_jessie_amd64'
- job-template:
- defaults: torbrowser-launcher_git
+ defaults: torbrowser-launcher_packages
name: '{name}_test_experimental_amd64'
- job-template:
- defaults: torbrowser-launcher_git
+ defaults: torbrowser-launcher_packages
name: '{name}_test_unstable_amd64'
- job-template:
- defaults: torbrowser-launcher_git
+ defaults: torbrowser-launcher_packages
name: '{name}_test_stretch_amd64'
- job-template:
- defaults: torbrowser-launcher_git
+ defaults: torbrowser-launcher_packages
name: '{name}_test_jessie_amd64'
+- job-template:
+ defaults: torbrowser-launcher_packages
+ name: '{name}_test_jessie_amd64_experimental'
+
- project:
name: torbrowser-launcher
jobs:
- '{name}_setup_schroot_unstable_amd64':
my_description: 'Setup unstable/amd64 schroot for testing torbrowser-launcher.'
my_timed: '42 1 * * *'
- my_shell: '/srv/jenkins/bin/schroot-create.sh torbrowser-launcher torbrowser-launcher-unstable unstable torbrowser-launcher ca-certificates awesome dbus xterm'
+ my_shell: '/srv/jenkins/bin/schroot-create.sh torbrowser-launcher torbrowser-launcher-unstable unstable torbrowser-launcher ca-certificates awesome dbus xterm x11-utils build-essential devscripts python-all debhelper dh-apparmor'
my_recipients: 'holger@layer-acht.org'
my_node: ''
- '{name}_setup_schroot_stretch_amd64':
my_description: 'Setup stretch/amd64 schroot for testing torbrowser-launcher.'
my_timed: '42 2 * * *'
- my_shell: '/srv/jenkins/bin/schroot-create.sh torbrowser-launcher torbrowser-launcher-stretch stretch torbrowser-launcher ca-certificates awesome dbus xterm'
+ my_shell: '/srv/jenkins/bin/schroot-create.sh torbrowser-launcher torbrowser-launcher-stretch stretch torbrowser-launcher ca-certificates awesome dbus xterm x11-utils build-essential devscripts python-all debhelper dh-apparmor'
my_recipients: 'holger@layer-acht.org'
my_node: ''
- '{name}_setup_schroot_jessie_amd64':
my_description: 'Setup jessie/amd64 schroot for testing torbrowser-launcher.'
my_timed: '42 3 * * *'
- my_shell: '/srv/jenkins/bin/schroot-create.sh torbrowser-launcher torbrowser-launcher-jessie jessie torbrowser-launcher ca-certificates awesome dbus xterm'
+ my_shell: '/srv/jenkins/bin/schroot-create.sh torbrowser-launcher torbrowser-launcher-jessie jessie torbrowser-launcher ca-certificates awesome dbus xterm x11-utils build-essential devscripts python-all debhelper dh-apparmor'
my_recipients: 'holger@layer-acht.org'
my_node: ''
- '{name}_test_experimental_amd64':
my_description: 'Test torbrowser-launcher from and on experimental/amd64.'
my_timed: '23 5 * * *'
- my_gitrepo: 'git://git.debian.org/git/collab-maint/torbrowser-launcher.git'
my_shell: '/srv/jenkins/bin/test_torbrowser-launcher.sh experimental'
my_recipients: 'holger@layer-acht.org'
my_node: ''
- '{name}_test_unstable_amd64':
my_description: 'Test torbrowser-launcher from and on unstable/amd64.'
my_timed: '23 5 * * *'
- my_gitrepo: 'git://git.debian.org/git/collab-maint/torbrowser-launcher.git'
my_shell: '/srv/jenkins/bin/test_torbrowser-launcher.sh unstable'
my_recipients: 'holger@layer-acht.org'
my_node: ''
- '{name}_test_stretch_amd64':
my_description: 'Test torbrowser-launcher from and on stretch/amd64.'
my_timed: '23 6 * * *'
- my_gitrepo: 'git://git.debian.org/git/collab-maint/torbrowser-launcher.git'
my_shell: '/srv/jenkins/bin/test_torbrowser-launcher.sh stretch'
my_recipients: 'holger@layer-acht.org'
my_node: ''
- '{name}_test_jessie_amd64':
my_description: 'Test torbrowser-launcher from and on jessie/amd64.'
my_timed: '23 7 * * *'
- my_gitrepo: 'git://git.debian.org/git/collab-maint/torbrowser-launcher.git'
my_shell: '/srv/jenkins/bin/test_torbrowser-launcher.sh jessie'
my_recipients: 'holger@layer-acht.org'
my_node: ''
+ - '{name}_test_jessie_amd64_experimental':
+ my_description: 'Test torbrowser-launcher from experimental on jessie/amd64.'
+ my_timed: '23 8 * * *'
+ my_shell: '/srv/jenkins/bin/test_torbrowser-launcher.sh jessie experimental'
+ my_recipients: 'holger@layer-acht.org'
+ my_node: ''
+ - '{name}_test_jessie_amd64_git_debian_experimental':
+ my_description: 'Test torbrowser-launcher on jessie/amd64 using the branch debian/experimental.'
+ my_gitrepo: 'git://git.debian.org/git/collab-maint/torbrowser-launcher.git'
+ my_gitbranch: 'debian/experimental'
+ my_shell: '/srv/jenkins/bin/test_torbrowser-launcher.sh jessie git'
+ my_recipients: 'holger@layer-acht.org'
+ my_node: ''