Merge lp://staging/~brendan-donegan/ubuntu-power-tests/tc-powermeter-07 into lp://staging/ubuntu-power-tests

Proposed by Brendan Donegan
Status: Needs review
Proposed branch: lp://staging/~brendan-donegan/ubuntu-power-tests/tc-powermeter-07
Merge into: lp://staging/ubuntu-power-tests
Diff against target: 77 lines (+65/-1)
2 files modified
debian/tests/control (+1/-1)
debian/tests/tc-powermeter-07 (+64/-0)
To merge this branch: bzr merge lp://staging/~brendan-donegan/ubuntu-power-tests/tc-powermeter-07
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Zygmunt Krynicki (community) Needs Fixing
Canonical Platform QA Team Pending
Review via email: mp+258897@code.staging.launchpad.net

Commit message

Add a test which enables Bluetooth and Wifi for the duration of the test

Description of the change

Add a test which enables Bluetooth and Wifi for the duration of the test

To post a comment you must log in.
10. By Brendan Donegan

tc-powermeter-07 test which enables BT and wifi for the duration of the test

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Max Brustkern (nuclearbob) wrote :

I think I may not have captured it well in the card, but the intent of this test is for wifi to be on but unassociated to any network. We'll need functionality to disassociate the network for the test, then reassociate it as part of the preparation. I'll see if I can get that working.

Revision history for this message
Max Brustkern (nuclearbob) wrote :

So I started working on a branch for tc-powermeter-06 that included changes to the path for the prepare script. My combined 06/07 branch is here:
lp:~nuclearbob/ubuntu-power-tests/flight-mode-test-with-adt-command
That will run both tests, but the tc-powermeter-07 script as written doesn't do what we actually want; it should unassociate wifi, and the prepare-device script should make an attempt to reassociate it. I'm not sure if it makes more sense to just run phablet-network separately (that's probably easier than doing it on the device.) Chris is going to look at it, and I'll be checking over it before I EOD.

Revision history for this message
Richard Huddie (rhuddie) wrote :

Max, I don't know if this is what you're looking for, but there is a helper used in the sanity wizard test to remove existing wi-fi connections before the test and restore them after:

http://bazaar.launchpad.net/~canonical-platform-qa/ubuntu-sanity-tests/trunk/view/head:/ubuntu_sanity_tests/helpers/testbed.py#L53

It sounds like the implementation would need to be split between the test which removes the connection and prepare-device script which restores it. Could be of use though.

11. By Brendan Donegan

Add code to disassociate from and reassociate to the wifi network

12. By Brendan Donegan

remove superflouos echo

13. By Brendan Donegan

Merged from trunk

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

You can always expect me to find a bug in anything

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Max Brustkern (nuclearbob) wrote :

What we'll actually need for this is for the test to disassociate wifi and for the preparation script to reassociate it. As such, I'm not sure of the best way to pass the network in question to the preparation script, since that will be running after a reboot, and will need to be able to run when this test hasn't run. Maybe as part of the provisioning process, we write the network name to a file, and the preparation script can read it from there?

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

Are you sure? Isn't it fine as long as the test leaves the system in the same state it was in prior to the test?

Revision history for this message
Richard Huddie (rhuddie) wrote :

I've created a new branch (dependent on this one) which will remove existing networks in tc-powermeter-07, and restore them in prepare-device. See here:

https://code.launchpad.net/~canonical-platform-qa/ubuntu-power-tests/backup-restore-network/+merge/259099

I think this addresses the problem. It would just assume that a network is already setup on the device, and the saved network details would persist after reboot, so they can be easily restored.

Let me know what you think.

Unmerged revisions

13. By Brendan Donegan

Merged from trunk

12. By Brendan Donegan

remove superflouos echo

11. By Brendan Donegan

Add code to disassociate from and reassociate to the wifi network

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