Merge lp://staging/~brendan-donegan/checkbox/bug1084601 into lp://staging/checkbox

Proposed by Brendan Donegan
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 1866
Merged at revision: 1880
Proposed branch: lp://staging/~brendan-donegan/checkbox/bug1084601
Merge into: lp://staging/checkbox
Diff against target: 406 lines (+184/-51)
3 files modified
debian/changelog (+5/-0)
jobs/bluetooth.txt.in (+15/-1)
jobs/suspend.txt.in (+164/-50)
To merge this branch: bzr merge lp://staging/~brendan-donegan/checkbox/bug1084601
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Brendan Donegan (community) Needs Resubmitting
Review via email: mp+142852@code.staging.launchpad.net

Description of the change

This branch adds a couple of checks before running commands which depend on Bluetooth working. One is to check if the hardware is hard blocked and provide a warning - the subsequent attempt to test will fail. The second is to check if the hardware is soft blocked and again provide a warning, but this time try and unblock it. There is also a short delay after the unblock as most Bluetooth chips take a few seconds to reinitialise (running the test with no delay was exhibiting failures)

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

10:24 < zyga> brendand: looking at your MP
10:24 < zyga> brendand: were you intending to fail the test if bluetooth is hard blocked?
10:25 < zyga> brendand: also, I have this feeling that the rate of repetition in that job warrants a small refactoring to a shell script
10:25 < brendand> zyga, hmm yeah, that's a fair point
10:26 < brendand> zyga, for the hard block, i'd rather just say it's hard block and then let it run and fail, which it probably will

review: Approve
Revision history for this message
Zygmunt Krynicki (zyga) wrote :
Download full text (21.5 KiB)

The attempt to merge lp:~brendan-donegan/checkbox/bug1084601 into lp:checkbox failed. Below is the output from the failed tests.

Running unittests...
[checkbox/lib/tests/test_resolver.py]
(tests=9, failures=0, errors=0)

[checkbox/parsers/tests/test_xinput.py]
(tests=8, failures=0, errors=0)

[checkbox/parsers/tests/test_dmidecode.py]
(tests=5, failures=0, errors=0)

[checkbox/parsers/tests/test_description.py]
(tests=14, failures=0, errors=0)

[checkbox/parsers/tests/test_efi.py]
(tests=3, failures=0, errors=0)

[checkbox/parsers/tests/test_dmi.py]
(tests=0, failures=0, errors=0)

[checkbox/parsers/tests/test_udevadm.py]
(tests=4, failures=0, errors=0)

[checkbox/parsers/tests/test_cputable.py]
(tests=2, failures=0, errors=0)

[checkbox/parsers/tests/test_submission.py]
(tests=10, failures=0, errors=0)

[checkbox/tests/test_message_files.py]
(tests=7, failures=0, errors=0)

[checkbox/tests/test_report.py]
(tests=4, failures=0, errors=0)

[checkbox/tests/test_setup_files.py]
(tests=3, failures=0, errors=0)

[checkbox/tests/test_job.py]
(tests=2, failures=0, errors=0)

[checkbox/heuristics/tests/test_udisks2.py]
(tests=1, failures=0, errors=0)

Running doctests...
[checkbox/parsers/tests/fixtures/xinput_quantal.txt]
(tests=0, failures=0, errors=0)

[checkbox/parsers/tests/fixtures/xinput_toshiba.txt]
(tests=0, failures=0, errors=0)

Total test cases: 72
Total doctests: 0
Total failures: 0
Total errors: 0
running test
running egg_info
creating plainbox.egg-info
writing requirements to plainbox.egg-info/requires.txt
writing plainbox.egg-info/PKG-INFO
writing top-level names to plainbox.egg-info/top_level.txt
writing dependency_links to plainbox.egg-info/dependency_links.txt
writing entry points to plainbox.egg-info/entry_points.txt
writing manifest file 'plainbox.egg-info/SOURCES.txt'
reading manifest file 'plainbox.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'plainbox.egg-info/SOURCES.txt'
running build_ext

+ ./test
.........
----------------------------------------------------------------------
Ran 9 tests in 0.041s

OK
........
----------------------------------------------------------------------
Ran 8 tests in 0.177s

OK
.....
----------------------------------------------------------------------
Ran 5 tests in 0.050s

OK
..............
----------------------------------------------------------------------
Ran 14 tests in 0.053s

OK
...
----------------------------------------------------------------------
Ran 3 tests in 0.025s

OK

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
....
----------------------------------------------------------------------
Ran 4 tests in 0.037s

OK
..
----------------------------------------------------------------------
Ran 2 tests in 0.008s

OK
..........
----------------------------------------------------------------------
Ran 10 tests in 3.043s

OK
.......
----------------------------------------------------------------------
Ran 7 tests in 82.222s

OK
....
----------------------------------------------------------------------
Ran 4 tests in 0.054s

OK
...
-----------------------------------------------------------...

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

11:02 < zyga> brendand: I found a bug in your MP
11:02 < zyga> brendand: and something else that's wrong as well, digging deeper
11:13 < zyga> brendand: there's a bug in the shell code
11:13 < zyga> but shell is not parsed here so it should _not_ break
11:14 < zyga> brendand: the actual error is caused by parsing two job entries as one
11:14 < zyga> brendand: so all kinds of weird text gets interpreted as python expression
11:15 < zyga> brendand: this comes from
11:15 < zyga> Failed to parse resource program for job <JobDefinition name:'suspend/bluetooth_detect_after_suspend' plugin:'shell'> from <Origin
              filename:'/home/zyga/.cache/tarmac/branches/checkbox/trunk/jobs/suspend.txt.in' line_start:496 line_end:518>
11:15 < zyga> I'm trying to figure out exactly why this happens, the text looks fine to me
11:17 < zyga> ehhh
11:17 < zyga> ok
11:17 < zyga> I see it
11:17 < zyga> brendand: line 502 in suspend.txt.in
11:17 < zyga> brendand: remove the leading space
11:17 < zyga> brendand: and I'll get the extra debug features as a patch
11:18 < zyga> brendand: also you've missed echo in subsequent line in the shell

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

Addressed on line 502 and 514

review: Needs Resubmitting
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches