Merge lp://qastaging/~kaxing/checkbox/bt4-bluez5 into lp://qastaging/checkbox

Proposed by Yung Shen
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 4279
Merged at revision: 4320
Proposed branch: lp://qastaging/~kaxing/checkbox/bt4-bluez5
Merge into: lp://qastaging/checkbox
Diff against target: 498 lines (+477/-0)
3 files modified
providers/plainbox-provider-checkbox/bin/bt_connect (+135/-0)
providers/plainbox-provider-checkbox/bin/bt_helper.py (+300/-0)
providers/plainbox-provider-checkbox/jobs/bluetooth.txt.in (+42/-0)
To merge this branch: bzr merge lp://qastaging/~kaxing/checkbox/bt4-bluez5
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Yung Shen (community) Needs Resubmitting
Review via email: mp+290716@code.qastaging.launchpad.net

Description of the change

context inherited from: https://code.launchpad.net/~cypressyew/checkbox/bt4-HOGP/+merge/288612

Add a manifest request for asking tester about BT 4.x capability.
Add a BT 4.x specific jos for HOGP devices (keyboard/mouse).
Based on bt_helper for Bluez 5.x support

known issue:
Unable to get the input() in plainbox, looking for alternative ways.

To post a comment you must log in.
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

I proposed a few improvements over tiny details inline.

Revision history for this message
Yung Shen (kaxing) wrote :

@kissiel Thanks for the review, will update base on your feedbacks. But for naming about unpairing() still needs a bit of advising. Please check.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

One small note for the break in the for loop

Revision history for this message
Yung Shen (kaxing) wrote :

Update few in-line comment replies.

Revision history for this message
Maciej Kisielewski (kissiel) wrote :

Following up the discussion in the inline comments

Revision history for this message
Yung Shen (kaxing) wrote :

replies updating!

4276. By Yung Shen

Update bt_connect: with new unpair_all and new-way of description for HOGP jobs

Revision history for this message
Yung Shen (kaxing) wrote :

Updating everything based on previous in-line comments.

For print(flush=True) I've file a new bug for further discussing.(if anyone interested)
https://bugs.launchpad.net/plainbox/+bug/1569808

review: Needs Resubmitting
Revision history for this message
Yung Shen (kaxing) wrote :

Verified on a targeting system(bt4, xenial/bluez5), everything works as expected.

Only one kind of failure the script won't able to capture:
the host system/bluez thinks it's paired but the device still blinking.
but I think this is left to tester's judgment as they are user-interact-verify jobs.

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

I've proposed a workaround to the print(flush=True), see my inline suggestion.

review: Needs Fixing
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

idem for the mouse job

Revision history for this message
Yung Shen (kaxing) wrote :

I've removed the part that requires instant flush, so the bt_connect now is not effected to the buffered issue. those print() within flush=True is working as expected.

review: Needs Resubmitting
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Hi Yung,
from the revision history, it seems that the branch was not re-submitted successfully, the latest one is still rev 4276, Apr. 13

Revision history for this message
Yung Shen (kaxing) wrote :

Hey @cypressyew, that's about right, I didn't made any changes since I've already removed the "buffered" part that mentioned in previous comments in revno 4276.

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

I tried to run the new tests using:

plainbox run -i 2013.com.canonical.plainbox::collect-manifest -i .*bluetooth4.*

I didn't work for two reasons:

1. Manifest entries does not support the requires statement
2. The two new jobs needs the following line to use manifest properly:

imports: from 2013.com.canonical.plainbox import manifest

review: Needs Fixing
Revision history for this message
Yung Shen (kaxing) wrote :

Thanks for the hint, fixed manifest and add bug number in comment for buffered print().

review: Needs Resubmitting
4277. By Yung Shen

Fix bluetooth.txt.in: add missing 'imports' for manifest requirements

4278. By Yung Shen

Add bug number to bt_connect about print(flush=True) buffering issue

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

One minor fix and it should be good to go, see below

review: Needs Fixing
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

And I think we could remove the TODO part in the comment, as this is quite mature now. (Convert print to logging might be the last thing)

Revision history for this message
Yung Shen (kaxing) wrote :

So I tried logging with level=logging.info it appears there are a lot informations going on, And I think we will need to discuss this, will keep my fake logging outputs at the moment so the cli work as expected.

Revision history for this message
Yung Shen (kaxing) :
review: Needs Resubmitting
4279. By Yung Shen

Update bluetooth.txt.in remove unecessary bits under manifest

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Those logging info could indeed be very useful. Let's merge this version and iterate.

A big +1 to all contributors. Thanks

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