Merge lp:~carl-milette/checkbox/507943 into lp:checkbox

Proposed by Carl Milette
Status: Merged
Merged at revision: 909
Proposed branch: lp:~carl-milette/checkbox/507943
Merge into: lp:checkbox
Diff against target: 57 lines (+16/-27)
2 files modified
jobs/disk.txt.in (+16/-9)
scripts/disk_bench_test (+0/-18)
To merge this branch: bzr merge lp:~carl-milette/checkbox/507943
Reviewer Review Type Date Requested Status
Jeff Lane  Approve
Review via email: mp+58740@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jeff Lane  (bladernr) wrote :

Approve... this makes disk_bench match behaviour in the other tests that operate on disks and such. Thanks for making this follow the practice of using udev_resource.

I have also updated the whitelists in -cert to account for the name change of the tests.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'jobs/disk.txt.in'
2--- jobs/disk.txt.in 2010-04-14 21:53:09 +0000
3+++ jobs/disk.txt.in 2011-04-21 19:33:28 +0000
4@@ -8,14 +8,21 @@
5 .
6 Is this correct?
7
8-plugin: manual
9+plugin: local
10 name: disk_bench
11 requires: device.category == 'DISK'
12-user: root
13-command: disk_bench_test
14-_description:
15- Disk benchmark:
16- .
17- $output
18- .
19- Is this ok?
20+description: Benchmark for each disk
21+command:
22+ cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=DISK"'
23+ plugin: manual
24+ name: disk_bench_test_`ls /sys$path/block`
25+ requires: device.path == "$path" and package.name == 'linux'
26+ user: root
27+ command: hdparm -tT /dev/`ls /sys$path/block` | sed 's/:.*= */ = /' | grep -v "^$"
28+ description:
29+ Disk Benchmark:
30+ .
31+ \$output
32+ .
33+ Is this ok?
34+ EOF
35
36=== removed file 'scripts/disk_bench_test'
37--- scripts/disk_bench_test 2009-08-26 22:02:21 +0000
38+++ scripts/disk_bench_test 1970-01-01 00:00:00 +0000
39@@ -1,18 +0,0 @@
40-#!/usr/bin/python
41-import sys
42-from subprocess import Popen, PIPE
43-
44-def main():
45- output = Popen('hdparm -tT /dev/sda',
46- stdout=PIPE, shell=True).communicate()[0]
47-
48- for line in output.splitlines()[-2:]:
49- line = line.lstrip()
50- line = ("%s %s"
51- % (line[:line.find(':')],
52- line[line.rfind('='):]))
53- print line
54-
55-
56-if __name__ == "__main__":
57- sys.exit(main())

Subscribers

People subscribed via source and target branches