Merge ~sbeattie/qa-regression-testing:moar-ci-tests into qa-regression-testing:master
Status: | Merged |
---|---|
Merged at revision: | a0489c38532078c29c32c97f97c47af0b38ceaba |
Proposed branch: | ~sbeattie/qa-regression-testing:moar-ci-tests |
Merge into: | qa-regression-testing:master |
Diff against target: |
213 lines (+93/-6) 4 files modified
.launchpad.yaml (+14/-0) lpcraft-runner (+8/-2) scripts/README.md (+28/-0) scripts/test-busybox.py (+43/-4) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alex Murray | Approve | ||
Review via email: mp+442935@code.launchpad.net |
Commit message
tests: add busybox tests to lpci plus infra to skip tests in lpci
Steve Beattie (7):
* [0012d86b] test-busybox.py: switch to python3
* [4c70d4a0] test-busybox.py: tests requires root due to udhcpc
* [fa8ea339] test-busybox.py: older busybox wget doesn't support https
* [4550df63] test-busybox.py: fix bitwise op test across all releases
* [175e1a2b] lpcraft-runner: export env var for skipping tests in lpci
* [841581fe] scripts/README.md: add notes on lpci
* [14a0bc5f] .launchpad.yaml: add busybox QRT script to CI tests
Description of the change
The overall point of this branch is to enable the busybox qrt scripts in lpci. Along the way, I corrected some issues, including some behavioral differencs in 14.04's busybox, to make sure the tests run across all supported versions and also in lpci; in particular some tests that would work in a local vm would fail to run in the lp test environment.
In particular, the script would attempt to exercise busybox's simple dhcp client (udhcpc) as well as use busybox's wget implementation to access https URLs and the ubuntu archive via ftp. To skip those, I set an environment variable LPCRAFT_QRT_RUNNER in the lpcraft-runner script and then skip tests if that environment variable is set, using python unittest's skipIf decorator (the busybox tests is also converted to python3).
Arguably, this variable could be set in the launchpad.yaml file, and maybe it should be. The idea behind setting it in the runner script was so that local testing with lpci would get the same behavior, but opinions appreciated here.
I also added a bit on lpci and skipping tests to the README for the scripts.
Thanks Steve, this looks awesome - I would have hoped that setting the variable inside the .launchpad.yaml would then mean that lpci would also set it when running locally - however, this would also mean we would have to duplicate that into every job entry in the yaml as well - so setting it in lpcraft-runner means we only have to put it in one place.
So FWIW I think your current approach is great.