Merge lp:~canonical-platform-qa/ubuntu-ota-tests/thinkingoutloud-wrapper-reflash-script into lp:ubuntu-ota-tests
| Status: | Merged |
|---|---|
| Approved by: | Leo Arias on 2015-03-24 |
| Approved revision: | 34 |
| Merged at revision: | 13 |
| Proposed branch: | lp:~canonical-platform-qa/ubuntu-ota-tests/thinkingoutloud-wrapper-reflash-script |
| Merge into: | lp:ubuntu-ota-tests |
| Diff against target: |
546 lines (+509/-1) 5 files modified
run-ota-tests (+79/-0) ubuntu_ota_tests/command_line.py (+290/-0) ubuntu_ota_tests/hooks.py (+0/-1) ubuntu_ota_tests/selftests/test_commandline.py (+138/-0) ubuntu_ota_tests/selftests/test_services.py (+2/-0) |
| To merge this branch: | bzr merge lp:~canonical-platform-qa/ubuntu-ota-tests/thinkingoutloud-wrapper-reflash-script |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| PS Jenkins bot | continuous-integration | Approve on 2015-03-24 | |
| Federico Gimenez (community) | Approve on 2015-03-24 | ||
| Christopher Lee (community) | Needs Fixing on 2015-03-19 | ||
| Brendan Donegan (community) | 2015-03-16 | Needs Fixing on 2015-03-18 | |
|
Review via email:
|
|||
Commit Message
Wrapper script to reflash the device to an old revision prior to running each ota update test with adt-run.
Description of the Change
WIP thoughts around how to flash the device between test runs.
Currently it's really thinking out load:
A script that runs the individual dep8 tests and reflashes the device in-between.
Some issues incl. the --testname argument not working as I expected it to and it still runs all the tests in d/t/control :-)
| Christopher Lee (veebers) wrote : | # |
> Some inline comments. Also the assumption of test files starting with a
> particular prefix is a little brittle. Is there any way we can parse the test
> names from debian/
For a first pass this was quick and hacky. I agree that it's brittle, I'll update the branch with a solution if I can get it done in time. Otherwise we'll use what's here and iterate on it.
| Christopher Lee (veebers) wrote : | # |
Not sure what to do about the phablet-network setting as it requires sudo perms. Running the whole script is dumb as adt attempts to do ssh stuff and the perms are all screwy (and will change the perms of .ssh/known_hosts for instance).
At the moment it'll prompt you for the password, and it's likely that the test will take long enough that the next time it's needed you'll get prompted again.
| Richard Huddie (rhuddie) wrote : | # |
I've made updates to now use nmcli to setup the wifi connection. This is called using adt-run --setup-command option. During testing I found that if the network connection already exists, adt-run would fail becaue nmcli reported a failure, although it was not an error that would cause any issues. So that is why the nmcli command always reports true. But under normal use this should never be an issue as the device is just reflashed. I also set the default revision to -1 and added a 10 minute timeout for each test execution.
- 33. By Richard Huddie on 2015-03-23
-
Fix self tests and add new ones for wifi and timeout parameters.
| Christopher Lee (veebers) wrote : | # |
Code looks good to me, currently trying to make a run on the device but it's playing up. If someone can confirm this run on a device this turns into an Approve from me.
| Federico Gimenez (fgimenez) wrote : | # |
Works great, only two issues:
* The test_apply_
@unittest.
* There's a flake8 error in ./ubuntu_
Thanks,
[1] https:/
- 34. By Richard Huddie on 2015-03-24
-
Fix review comments: skip test_apply_
update_ noop if update available and fix flake8. Revert logging to use print which was not previously working.
| Richard Huddie (rhuddie) wrote : | # |
Thanks Federico, I have made those updates.
| Richard Huddie (rhuddie) wrote : | # |
Hi Chris, I confirm it works. There was an issue with test_apply_
Thanks.
| Leo Arias (elopio) wrote : | # |
federico + veebers, that's +2. Top-approving...

Some inline comments. Also the assumption of test files starting with a particular prefix is a little brittle. Is there any way we can parse the test names from debian/ tests/control instead? If not that's ok