Merge lp:~cr3/checkbox/1057762 into lp:checkbox

Proposed by Marc Tardif
Status: Merged
Approved by: Brendan Donegan
Approved revision: 1716
Merged at revision: 1720
Proposed branch: lp:~cr3/checkbox/1057762
Merge into: lp:checkbox
Diff against target: 34 lines (+4/-2)
2 files modified
debian/changelog (+2/-0)
jobs/optical.txt.in (+2/-2)
To merge this branch: bzr merge lp:~cr3/checkbox/1057762
Reviewer Review Type Date Requested Status
Brendan Donegan (community) Approve
Review via email: mp+126798@code.launchpad.net

Commit message

Merged fix to bug 1057762 by cr3.

Description of the change

This merge request fixes this error:

2012-09-27 16:22:15,313 ERROR Error running event handler <string> report_message({'usage': 'filter_templates [OPTIONS] [FILE...]', 'suite': 'optical/cdrom-write-automated'}) for event type 'report-message'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/checkbox/reactor.py", line 74, in fire
    results.append(handler(*args, **kwargs))
  File "<string>", line 150, in report_message
KeyError: 'name'

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

While this looks all fine and I would gladly accept it I came to realize I don't really know how to review merge requests like that. I'm not familiar with most scripts or specifics of whitelists.

Could you share a piece of advice, how to reliably review such merge requests?

Revision history for this message
Marc Tardif (cr3) wrote :

You could either run checkbox from the root of the branch and look for the error pasted above in the checkbox.log file. Or, you could more precisely try running the commands that failed. For example, this is how you could run the command for the optical/dvd-write test:

$ export PATH=`pwd`/scripts:$PATH
$ cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=CDROM"'
plugin: manual
name: optical/dvd-write_`ls /sys$path/block`
requires: device.path == "$path"
user: root
command: optical_write_test /dev/`ls /sys$path/block` | ansi_parser
description:
 PURPOSE:
     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.
 STEPS:
     1. Enter a blank DVD-R or DVD+R into your drive
     2. Click "Test" to begin.
     3. When the CD tray ejects the media after burning, close it (DO NOT remove the disk, it is needed for the second portion of the test). Note, you must close the drive within 5 minutes or the test will time out.
 VERIFICATION:
     This test should automatically select "Yes" if it passes, "No" if it fails.
EOF

Before the merge request, you'll get an error. After, you won't get an error anymore.

Revision history for this message
Marc Tardif (cr3) wrote :

Note that this merge request fixes a critical bug that is affecting other tests. Please make sure to test and merge this code as quickly as possible, otherwise I suspect someone else will spend time trying to fix the same problem. Thanks!

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Looks good, +1

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 2012-09-27 18:10:45 +0000
3+++ debian/changelog 2012-09-27 20:53:35 +0000
4@@ -90,6 +90,8 @@
5 * [FEATURE] tools/lint: Added script to consistently check syntax.
6 * plugins/apport_prompt.py: Removed apport plugin that caused crashes
7 when trying to send bug report (LP #1047857)
8+ * jobs/optical.txt.in: Fixed missing category assignment in optical
9+ dvd write tests (LP: #1057762)
10
11 [Sean Feole]
12 * [FEATURE] scripts/battery_test: measures battery capacity before and after
13
14=== modified file 'jobs/optical.txt.in'
15--- jobs/optical.txt.in 2012-09-26 16:43:32 +0000
16+++ jobs/optical.txt.in 2012-09-27 20:53:35 +0000
17@@ -74,7 +74,7 @@
18 device.category == 'CDROM'
19 optical_drive.cd == 'writable'
20 command:
21- cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category"'
22+ cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=CDROM"'
23 plugin: shell
24 name: optical/cdrom-write-automated_`ls /sys$path/block`
25 requires: device.path == "$path"
26@@ -133,7 +133,7 @@
27 device.category == 'CDROM'
28 optical_drive.dvd == 'writable'
29 command:
30- cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category"'
31+ cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=CDROM"'
32 plugin: shell
33 name: optical/dvd-write-automated_`ls /sys$path/block`
34 requires: device.path == "$path"

Subscribers

People subscribed via source and target branches