Merge lp:~canonical-platform-qa/ubuntu-ota-tests/current-version-number into lp:ubuntu-ota-tests
| Status: | Merged |
|---|---|
| Approved by: | Leo Arias on 2015-03-11 |
| Approved revision: | 27 |
| Merged at revision: | 4 |
| Proposed branch: | lp:~canonical-platform-qa/ubuntu-ota-tests/current-version-number |
| Merge into: | lp:ubuntu-ota-tests |
| Diff against target: |
152 lines (+48/-30) 5 files modified
debian/tests/control (+3/-1) debian/tests/ota_basic (+0/-29) debian/tests/ota_selftests (+30/-0) debian/tests/ubuntu_ota_tests/selftests/test_services.py (+8/-0) debian/tests/ubuntu_ota_tests/services.py (+7/-0) |
| To merge this branch: | bzr merge lp:~canonical-platform-qa/ubuntu-ota-tests/current-version-number |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| PS Jenkins bot | continuous-integration | Approve on 2015-03-11 | |
| Leo Arias (community) | 2015-03-09 | Approve on 2015-03-11 | |
| Richard Huddie (community) | Approve on 2015-03-09 | ||
| Brendan Donegan (community) | 2015-03-04 | Approve on 2015-03-09 | |
|
Review via email:
|
|||
Commit Message
Getting the current version number through the D-Bus API
Description of the Change
For executing the tests:
$ adt-run -B --unbuilt-tree=. --- ssh -s adb
| Federico Gimenez (fgimenez) wrote : | # |
You are right, it was a proof of concept. I've modified it to run from a test with a bash function that could be reused.
| Barry Warsaw (barry) wrote : | # |
Thoughts, suggestions, questions.
| Federico Gimenez (fgimenez) wrote : | # |
Some inline comments, thanks!
| Federico Gimenez (fgimenez) wrote : | # |
I've taken the opportunity to add some self tests for the current code. The get_systemimage
| Brendan Donegan (brendan-donegan) wrote : | # |
Thanks for the tests, but I'm confused by some of the refactoring you did.
| Federico Gimenez (fgimenez) wrote : | # |
@brendand finally I've reverted the initial approach, if we need to add more methods to interact with the api the iface would be instantiated one time for each one of them with the default value of the function as I had defined it.
| Brendan Donegan (brendan-donegan) wrote : | # |
Okay looks good to me. Try and get one more review
| Brendan Donegan (brendan-donegan) wrote : | # |
Some questions about debian/
| Federico Gimenez (fgimenez) wrote : | # |
Yes, ota_basic was a shell-script based test used in the first spikes, see for example this recent branch from Chris [1] where it is already removed.
Regarding the Tests-Directory configuration option I've leave it there as a remainder to myself (we can remove it of course), it is what Martin suggested in order to execute the autopkgtest scripts from the root of the project and being able to import the python modules placed there as well. I think that we still need to decide how are we going to handle this.
| Brendan Donegan (brendan-donegan) wrote : | # |
> Yes, ota_basic was a shell-script based test used in the first spikes, see for
> example this recent branch from Chris [1] where it is already removed.
>
> Regarding the Tests-Directory configuration option I've leave it there as a
> remainder to myself (we can remove it of course), it is what Martin suggested
If it's to serve as a reminder than put an actual reminder, something like '# We might be able to use Tests-Directory here instead of hacking the path in the scripts'
> in order to execute the autopkgtest scripts from the root of the project and
> being able to import the python modules placed there as well. I think that we
> still need to decide how are we going to handle this.
>
> [1] https:/
> for-running-
| Federico Gimenez (fgimenez) wrote : | # |
Well, it was just a remainder for me :) I've removed it, let's see if we finally use it or not
| Leo Arias (elopio) wrote : | # |
This branch has some small flake8 errors. Please fix them before merging. Other than that, looks good to me.
| Federico Gimenez (fgimenez) wrote : | # |
Ok, fixed. We could add a minimal setup.py file for executing flake8 (and perhaps coverage), don't know if it's worth the effort.
Thanks!
| Richard Huddie (rhuddie) wrote : | # |
Checked there were no flake8 errors and ran with adt-run, which gave the correct build number. Looks good, so approving.
| Leo Arias (elopio) wrote : | # |
135 +++ ubuntu_
This file is missing the copyright header. After that, +1 from me.
| Federico Gimenez (fgimenez) wrote : | # |
Ok, added the copyright; there's also a notice in the readme about how to run the unit tests
Thanks!
| Federico Gimenez (fgimenez) wrote : | # |
Merged [1] into this one, I've put this one back to in progress until that branch lands.
[1] https:/
- 24. By Federico Gimenez on 2015-03-11
-
flake8 fixes; reverted ota_basic
| Brendan Donegan (brendan-donegan) wrote : | # |
Already approved by me, I don't see anything else to be done
| Leo Arias (elopio) wrote : | # |
looks good. I'd just like the coverage command in a script.
- 25. By Federico Gimenez on 2015-03-11
-
returning an actual int
- 26. By Federico Gimenez on 2015-03-11
-
test instead of test command; moved coverage reports to ADT_ARTIFACTS; setup + addcleanup instead of teardown
| Federico Gimenez (fgimenez) wrote : | # |
Ok, I think that all the issues have been addressed... except the ota_basic one, it's a mistery for me why it is reported like that
Thanks!
| Leo Arias (elopio) wrote : | # |
Great, thanks Federico.
I think we should set -e to the ota_selftests script to be on the safe side.
I'll do it as I think you already EOD.

Why does the current_version script need to call adb? Tests shouldn't have to call adb that should be a matter for the runner - I would remove that if it doesn't have any purpose