Merge lp:~joetalbott/adt-cloud-worker/user_docs into lp:adt-cloud-worker

Proposed by Joe Talbott on 2015-04-29
Status: Merged
Approved by: Joe Talbott on 2015-04-30
Approved revision: 47
Merged at revision: 44
Proposed branch: lp:~joetalbott/adt-cloud-worker/user_docs
Merge into: lp:adt-cloud-worker
Diff against target: 69 lines (+65/-0)
1 file modified
README-run-locally.rst (+65/-0)
To merge this branch: bzr merge lp:~joetalbott/adt-cloud-worker/user_docs
Reviewer Review Type Date Requested Status
Joe Talbott (community) Approve on 2015-04-30
Para Siva (community) Approve on 2015-04-30
Francis Ginther Approve on 2015-04-30
Celso Providelo (community) 2015-04-29 Approve on 2015-04-30
Review via email:

Commit message

Add documentation for running tests locally like CI does.

Description of the change

Add documentation for running tests locally like CI does.

To post a comment you must log in.

A few thoughts, which are only mild suggestions, feel free to ignore:

* I wonder if this is the best place for the docs?

* I suggest that the default documented command should be sans '-d' options, with a note that they can be added to increase the verbosity.

* The $PROXY env var isn't documented anywhere.

* What happens when we bump the timeout values we use in the service itself?

As an alternative approach, since the devs have the branch locally to be reading the docs, how about suggesting that they run something like:

python3 -c "import adt_cloud_worker; adt_cloud_worker.run_test(package='linux', result_dirt='/tmp/results'...)"

We can re-arrange the code to make that easier. Since one of the acceptance criteria is that the tests must be repeatable locally, this seems like it would be within the scope of the sprint, and would upgrade the 'connasence of value' too 'connasence of name' instead, which is an improvment.


Celso Providelo (cprov) wrote :

Joe, few suggestions as inline comments, let me know what you think.

Francis Ginther (fginther) wrote :

I think the overall format for this good: make it obvious what the input is, then provide a nearly copy-n-paste example of how to run it.

This is kind of thing is tricky as we don't want to just document adt-run, there's already a man page for that (which we should point to along with a minimum required version). I really think it's best to expose the adt-run command directly as this should really drive people into using adt-run directly and make it clear that CI isn't doing anything special to make this work. So I think we should cover the uci-nova options, but leave anything adt-run specific to its man page.

45. By Joe Talbott on 2015-04-30

Cleanup per review.

* Add prerequisites
* Clarify optional uci-nova arguments
* Simplify adt-run command example
* Explain caveats for special networking issues CI has to consider.

Joe Talbott (joetalbott) wrote :

I've pushed a new commit addressing most of the review comments. Please re-review and comment. Thanks.

Celso Providelo (cprov) wrote :


Thanks for accepting my suggestions, there are still some adjustments pointed as inline comments, but since they are minor, I am pre-approving it.

review: Approve
Francis Ginther (fginther) wrote :

One correction in the comment I had passed along earlier. Otherwise this looks good. This just presents a single, most simple way to reproduce the test. I think we will soon get feedback on this and we'll have clear input on what needs to be tweaked from actual users.

Also approving pending the one change in the version.

review: Approve
46. By Joe Talbott on 2015-04-30

Fix autopkgtest version and proxy example. Remove extraneous blank lines.

Para Siva (psivaa) wrote :

An inline comment, but +1

review: Approve
Para Siva (psivaa) :
47. By Joe Talbott on 2015-04-30

Indicate that only bootstack has been used for testing

Joe Talbott (joetalbott) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'README-run-locally.rst'
2--- README-run-locally.rst 1970-01-01 00:00:00 +0000
3+++ README-run-locally.rst 2015-04-30 14:02:02 +0000
4@@ -0,0 +1,65 @@
5+How to run tests locally the same way they are run in CI.
8+Steps for running the dep8 tests for a package the way they are run in CI.
13+autopkgtest 3.11.2-0 or newer, available from ppa:canonical-ci-engineering/u-services
18+Set up the environment::
20+ # Source your cloud credentials: This has only been tested on bootstack at the moment.
21+ . ~/.novarc
23+ # the package you want to test
24+ export PACKAGE=some-package
26+ # where results will be placed (the directory is created if it doesn't exist)
27+ export RESULT_DIR=some-dir
29+ # The IMAGE may change daily, be sure to check 'nova image-list'
30+ export IMAGE=ubuntu-vivid-15.04-amd64-server-20150422-disk1.img
32+ # (optional depending on your cloud)
33+ # The neutron network uuid.
34+ export NET_UUID=415a840-eb06-4e8a-906c-413c658f5bf6
36+ # (optional)
37+ # The archive mirror to use
38+ export MIRROR=
40+ # (optional)
41+ # The http proxy to use
42+ export PROXY=
44+Running Tests
47+Run the tests::
49+ adt-run -d --apt-source $PACKAGE --output-dir $RESULT_DIR
50+ --apt-pocket proposed --apt-upgrade \
51+ --- ssh -s ./uci-nova -- --flavor m1.small --image $IMAGE
54+The "-d"s may be omitted to reduce the verbosity of the output.
56+If using a neutron network add to uci-nova arguments::
58+ --net-id=$NET_UUID
60+If a specific mirror is needed for the archive add this to uci-nova arguments::
62+ --mirror=$MIRROR
64+If an http proxy is needed add this to uci-nova arguments::
66+ --proxy=$PROXY
68+"--shell-fail" can be added to the adt-run arguments to push a shell on test failures.
69+See adt-run(1) for the full list of adt-run arguments.


People subscribed via source and target branches