summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-11-16 03:13:43 +0100
committerHolger Levsen <holger@layer-acht.org>2015-11-16 03:13:43 +0100
commit20248e429f13bd9489867b471507cf5dafd7b9f0 (patch)
tree579eac2b90ee9e9153e757f24f6b90895b644988
parentfb102928cba9c6056a82287e439c71a3bdfc6054 (diff)
downloadjenkins.debian.net-20248e429f13bd9489867b471507cf5dafd7b9f0.tar.xz
torbrowser tests: fix git jobs and use notify-send
-rwxr-xr-xbin/test_torbrowser-launcher.sh21
-rw-r--r--job-cfg/torbrowser-launcher.yaml12
2 files changed, 18 insertions, 15 deletions
diff --git a/bin/test_torbrowser-launcher.sh b/bin/test_torbrowser-launcher.sh
index 9a835600..f7113a0d 100755
--- a/bin/test_torbrowser-launcher.sh
+++ b/bin/test_torbrowser-launcher.sh
@@ -104,8 +104,8 @@ download_and_launch() {
rm $DBUS_SESSION_FILE
ffmpeg -f x11grab -s $SIZE -i :$SCREEN.0 $VIDEO > /dev/null 2>&1 &
FFMPEGPID=$!
- echo "$(date -u) - starting torbrowser tests"
- #echo "naughty.notify({ text = '$(date -u) - starting torbrowser tests' })" | schroot --run-session -c $SESSION --preserve-environment -- awesome-client
+ echo "'$(date -u) - starting torbrowser tests'" | tee >( xargs schroot --run-session -c $SESSION --preserve-environment -- notify-send )
+ update_screenshot
echo "$(date -u) - starting torbrowser-launcher the first time…"
( timeout -k 30m 29m schroot --run-session -c $SESSION --preserve-environment -- torbrowser-launcher --settings || true ) &
sleep 10
@@ -119,32 +119,34 @@ download_and_launch() {
sleep 10
update_screenshot
# this directory only exist once torbrower has been successfully installed
- STATUS="$(schroot --run-session -c $SESSION -- [ ! -d $HOME/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser ] || echo 'Torbrowser downloaded and installed.')"
+ STATUS="$(schroot --run-session -c $SESSION -- [ ! -d $HOME/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser ] || echo '$(date -u ) - torbrowser downloaded and installed.')"
if [ -n "$STATUS" ] ; then
sleep 10
+ echo "'$STATUS'" | tee >( xargs schroot --run-session -c $SESSION --preserve-environment -- notify-send )
update_screenshot
- echo "Status: $STATUS"
break
fi
done
if [ ! -n "$STATUS" ] ; then
- echo "$(date -u) - could not download torbrowser, please investigate."
+ echo "'$(date -u) - could not download torbrowser, please investigate.'" | tee >( xargs schroot --run-session -c $SESSION --preserve-environment -- notify-send -u critical )
+ update_screenshot
exit 1
fi
echo "$(date -u) - waiting for torbrowser to start…"
for i in $(seq 1 6) ; do
sleep 10
# this directory only exist once torbrower has successfully started
- STATUS="$(schroot --run-session -c $SESSION -- [ ! -d $HOME/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/profile.default ] || echo 'Torbrowser running.')"
+ STATUS="$(schroot --run-session -c $SESSION -- [ ! -d $HOME/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/profile.default ] || echo '$(date -u ) - torbrowser running.')"
if [ -n "$STATUS" ] ; then
sleep 10
+ echo "'$STATUS'" | tee >( xargs schroot --run-session -c $SESSION --preserve-environment -- notify-send )
update_screenshot
- echo "Status: $STATUS"
break
fi
done
if [ ! -n "$STATUS" ] ; then
- echo "$(date -u) - could not start torbrowser, please investigate."
+ echo "'$(date -u) - could not start torbrowser, please investigate.'" | tee >( xargs schroot --run-session -c $SESSION --preserve-environment -- notify-send -u critical )
+ update_screenshot
exit 1
fi
echo "$(date -u) - pressing <return>, to connect directly via tor…"
@@ -168,7 +170,7 @@ download_and_launch() {
update_screenshot
done
sleep 1
- #echo "naughty.notify({ text = '$(date -u) - torbrowser tests end' })" | schroot --run-session -c $SESSION --preserve-environment -- awesome-client
+ echo "'$(date -u) - torbrowser tests end.'" | tee >( xargs schroot --run-session -c $SESSION --preserve-environment -- notify-send )
update_screenshot
echo "$(date) - telling awesome to quit."
echo 'awesome.quit()' | schroot --run-session -c $SESSION --preserve-environment -- awesome-client
@@ -207,6 +209,7 @@ if [ "$2" = "git" ] ; then
mkdir $TMPDIR/git
cp -r * $TMPDIR/git
elif [ "$SUITE" = "experimental" ] || [ "$2" = "experimental" ] ; then
+ SUITE=unstable
EXPERIMENTAL=yes
fi
WORKSPACE=$(pwd)
diff --git a/job-cfg/torbrowser-launcher.yaml b/job-cfg/torbrowser-launcher.yaml
index ea0da8cf..84946d47 100644
--- a/job-cfg/torbrowser-launcher.yaml
+++ b/job-cfg/torbrowser-launcher.yaml
@@ -149,7 +149,7 @@
- job-template:
defaults: torbrowser-launcher_git
- name: '{name}_test_unstable_amd64_git_debian_sid':
+ name: '{name}_test_unstable_amd64_git_debian_sid'
- job-template:
defaults: torbrowser-launcher_packages
@@ -165,11 +165,11 @@
- job-template:
defaults: torbrowser-launcher_git
- name: '{name}_test_jessie_amd64_git_debian_experimental':
+ name: '{name}_test_jessie_amd64_git_debian_experimental'
- job-template:
defaults: torbrowser-launcher_git
- name: '{name}_test_jessie_amd64_git_debian_sid':
+ name: '{name}_test_jessie_amd64_git_debian_sid'
- project:
name: torbrowser-launcher
@@ -177,19 +177,19 @@
- '{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 x11-utils build-essential devscripts python-all debhelper dh-apparmor'
+ my_shell: '/srv/jenkins/bin/schroot-create.sh torbrowser-launcher torbrowser-launcher-unstable unstable torbrowser-launcher ca-certificates awesome dbus xterm x11-utils libnotify-bin 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 x11-utils build-essential devscripts python-all debhelper dh-apparmor'
+ my_shell: '/srv/jenkins/bin/schroot-create.sh torbrowser-launcher torbrowser-launcher-stretch stretch torbrowser-launcher ca-certificates awesome dbus xterm x11-utils libnotify-bin 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 x11-utils build-essential devscripts python-all debhelper dh-apparmor'
+ my_shell: '/srv/jenkins/bin/schroot-create.sh torbrowser-launcher torbrowser-launcher-jessie jessie torbrowser-launcher ca-certificates awesome dbus xterm x11-utils libnotify-bin build-essential devscripts python-all debhelper dh-apparmor'
my_recipients: 'holger@layer-acht.org'
my_node: ''
- '{name}_test_experimental_amd64':