Merge lp:~roadmr/checkbox/fix-ansi-parser-exit-code into lp:checkbox

Proposed by Daniel Manrique
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 1954
Merged at revision: 1954
Proposed branch: lp:~roadmr/checkbox/fix-ansi-parser-exit-code
Merge into: lp:checkbox
Diff against target: 87 lines (+10/-6)
4 files modified
debian/changelog (+3/-0)
jobs/graphics.txt.in (+2/-1)
jobs/optical.txt.in (+4/-4)
jobs/suspend.txt.in (+1/-1)
To merge this branch: bzr merge lp:~roadmr/checkbox/fix-ansi-parser-exit-code
Reviewer Review Type Date Requested Status
Jeff Marcom (community) Approve
Review via email: mp+150927@code.launchpad.net

Description of the change

This adds set -o pipefail to a few jobs that need it to prevent ansi_parser from eating the return code and painting a rosy picture when things are potentially bleaker.

To post a comment you must log in.
Revision history for this message
Jeff Marcom (jeffmarcom) wrote :

looks good thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-02-25 09:20:23 +0000
3+++ debian/changelog 2013-02-27 22:30:31 +0000
4@@ -5,6 +5,9 @@
5 * scripts/sources_test - modified script so that it takes sources list
6 location and repository list as arguments
7
8+ [ Daniel Manrique ]
9+ * Added pipefail option to a few jobs using ansi_parser (LP: #1131598)
10+
11 -- Brendan Donegan <brendan.donegan@canonical.com> Mon, 18 Feb 2013 14:35:27 +0000
12
13 checkbox (0.15.3) raring; urgency=low
14
15=== modified file 'jobs/graphics.txt.in'
16--- jobs/graphics.txt.in 2012-12-12 12:59:22 +0000
17+++ jobs/graphics.txt.in 2013-02-27 22:30:31 +0000
18@@ -170,7 +170,7 @@
19 plugin: shell
20 name: graphics/screenshot
21 requires: package.name == 'fswebcam'
22-command: camera_test still --device=/dev/external_webcam -f ${CHECKBOX_DATA}/screenshot.jpg -q 2>&1 | ansi_parser
23+command: set -o pipefail; camera_test still --device=/dev/external_webcam -f ${CHECKBOX_DATA}/screenshot.jpg -q 2>&1 | ansi_parser
24 _description:
25 PURPOSE:
26 Take a screengrab of the current screen (logged on Unity desktop)
27@@ -191,6 +191,7 @@
28 command:
29 dbus-launch gsettings set org.gnome.totem repeat true
30 totem --fullscreen ${CHECKBOX_SHARE}/data/video/Ogg_Theora_Video.ogv 2>/dev/null &
31+ set -o pipefail
32 sleep 15 && camera_test still --device=/dev/external_webcam -f ${CHECKBOX_DATA}/screenshot_fullscreen_video.jpg -q 2>&1 | ansi_parser
33 sleep 5 && totem --quit 2>/dev/null
34 dbus-launch gsettings set org.gnome.totem repeat false
35
36=== modified file 'jobs/optical.txt.in'
37--- jobs/optical.txt.in 2012-10-11 20:48:55 +0000
38+++ jobs/optical.txt.in 2013-02-27 22:30:31 +0000
39@@ -58,7 +58,7 @@
40 name: optical/cdrom-write_`ls /sys$path/block`
41 requires: device.path == "$path"
42 user: root
43- command: optical_write_test /dev/`ls /sys$path/block` | ansi_parser
44+ command: set -o pipefail; optical_write_test /dev/`ls /sys$path/block` | ansi_parser
45 description:
46 PURPOSE:
47 This test will check your system's $product CD writing capabilities. This test requires a blank CD-R or CD+R. If you do not have a blank disk, skip this test.
48@@ -80,7 +80,7 @@
49 name: optical/cdrom-write-automated_`ls /sys$path/block`
50 requires: device.path == "$path"
51 user: root
52- command: optical_write_test /dev/`ls /sys$path/block` | ansi_parser
53+ command: set -o pipefail; optical_write_test /dev/`ls /sys$path/block` | ansi_parser
54 description:
55 This is an automated version of optical/cdrom-write. It assumes you have already inserted a data CD into your optical drive prior to running Checkbox.
56 EOF
57@@ -116,7 +116,7 @@
58 name: optical/dvd-write_`ls /sys$path/block`
59 requires: device.path == "$path"
60 user: root
61- command: optical_write_test /dev/`ls /sys$path/block` | ansi_parser
62+ command: set -o pipefail; optical_write_test /dev/`ls /sys$path/block` | ansi_parser
63 description:
64 PURPOSE:
65 This test will check your system's $product writing capabilities. This test requires a blank DVD-R or DVD+R. If you do not have a blank DVD disk, skip this test.
66@@ -140,7 +140,7 @@
67 name: optical/dvd-write-automated_`ls /sys$path/block`
68 requires: device.path == "$path"
69 user: root
70- command: optical_write_test /dev/`ls /sys$path/block` | ansi_parser
71+ command: set -o pipefail; optical_write_test /dev/`ls /sys$path/block` | ansi_parser
72 description:
73 This is an automated version of optical/dvd-write. It assumes you have already inserted a data DVD into your optical drive prior to running Checkbox.
74 EOF
75
76=== modified file 'jobs/suspend.txt.in'
77--- jobs/suspend.txt.in 2013-01-15 22:41:08 +0000
78+++ jobs/suspend.txt.in 2013-02-27 22:30:31 +0000
79@@ -790,7 +790,7 @@
80 name: suspend/screenshot_after_suspend
81 depends: suspend/suspend_advanced_auto
82 requires: package.name == 'fswebcam'
83-command: camera_test still --device=/dev/external_webcam -f ${CHECKBOX_DATA}/screenshot_after_suspend.jpg -q 2>&1 | ansi_parser
84+command: set -o pipefail; camera_test still --device=/dev/external_webcam -f ${CHECKBOX_DATA}/screenshot_after_suspend.jpg -q 2>&1 | ansi_parser
85 _description:
86 PURPOSE:
87 Take a screengrab of the current screen after suspend (logged on Unity desktop)

Subscribers

People subscribed via source and target branches