Merge ppa-dev-tools:set-command-dependencies into ppa-dev-tools:main
Status: | Merged | ||||
---|---|---|---|---|---|
Merge reported by: | Bryce Harrington | ||||
Merged at revision: | 731e1db3e6065a5951108673437b588e689e14e8 | ||||
Proposed branch: | ppa-dev-tools:set-command-dependencies | ||||
Merge into: | ppa-dev-tools:main | ||||
Diff against target: |
472 lines (+197/-32) 5 files modified
ppa/lp.py (+10/-2) ppa/ppa.py (+122/-4) scripts/ppa (+36/-18) tests/helpers.py (+5/-0) tests/test_scripts_ppa.py (+24/-8) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Lena Voytek (community) | Approve | ||
Canonical Server packageset reviewers | Pending | ||
Canonical Server Reporter | Pending | ||
Review via email: mp+441265@code.staging.launchpad.net |
Description of the change
This adds support for the --ppa-dependencies option to the create and set commands, to permit adding one or more PPAs for satisfying the given PPA's build dependencies.
I've also added the start of a handy smoketest for the ppa/ppa.py module to run through the basic settings. I plan to expand this to exercise more of the module but for now just tried to establish the basic structure and operation. I've sorted out making it use the 'qastaging' test instance of Launchpad to be able to validate the launchpad operations without actually impacting anything in production. Note that the data from qastaging is quite old and in fact may be missing your user account if you registered within the last few years, so I hope it works but YMMV. If not, you can flip staging off by editing the smoketest thusly:
lp = Lp('smoketest', staging=False)
There's also a few small cleanup/refactors in separate commits.
Anyway, as usual the smoketest can be run via:
$ python3 -m ppa.ppa
And all testing run via `pytest-3` or:
$ make check
There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.
Example output for the smoke test:
$ python3 -m ppa.ppa ####### ####### ##### ####### ####### #####
#######
## Ppa class smoke test ##
#######
setting desc to 'This is a testing PPA and can be deleted'
desc is now 'This is a testing PPA and can be deleted'
name: test-ppa-dxtefi test-ppa- dxtefi ppa-dxtefi ubuntu/ test-ppa- dxtefi /api.qastaging. launchpad. net/devel/ ~bryce/ +archive/ ubuntu/ test-ppa- dxtefi /qastaging. launchpad. net/~bryce/ +archive/ ubuntu/ test-ppa- dxtefi ubuntu/ dependency- ppa-dxtefi /qastaging. launchpad. net/~bryce/ +archive/ ubuntu/ test-ppa- dxtefi
address: ppa:bryce/
str(ppa): bryce/test-
reference: ~bryce/
self_link: https:/
web_link: https:/
description: This is a testing PPA and can be deleted
has_packages: False
architectures: amd64/arm64
dependencies: ~bryce/
url: https:/
Ready to cleanup (i.e. delete) temporary PPAs? (y/n) y
...Cleaning up test ppa...