~brendan-donegan/maas/power_commands_pxe

380 by Ricardo Bánffy
Improved test
1
Some tips for the developer
2
===========================
3
4
This document exists so developers can write tips for other developers
5
who need to add or fix tests to this environment.
6
7
In a nutshell
8
-------------
9
10
The script `maas-package-test` calls nosetest3, which, in turn, runs
11
`maas-integration.py`.
12
13
14
Pausing the test
15
----------------
16
17
The `utils.py` file contains a handy function, `pause_until_released`,
18
that writes a message to `/tmp/paused` and waits until the file is
19
deleted. It can be used to pause the test program at any given time so
20
you can ssh into the machine and inspect it. Another neat trick you can
381 by Ricardo Bánffy
Added a friendlier pause
21
do is to stop the program before any test runs. You can then run the
22
tests (and change the test-integration.py file to suit your needs). From
23
a folder named like `/tmp/adt-run.Ezz1tN/build.mM6/real-tree`, run
24
`nosetests3 --verbose --stop debian/tests/maas-integration.py` to start
25
it.
472.1.1 by Mike Pontillo
Add additional hacking instructions.
26
27
Creating a Jenkins Job
28
----------------------
29
30
To create a Jenkins job to run a private branch of the CI suite, first
31
log into the Jenkins server, then select `New Item` on the left panel.
32
33
Type in a name that identifies your name and your branch of the CI
34
tests.
35
36
Select `Copy existing from` and copy from the desired job. For example,
37
to run the default suite on Xenial, and MAAS code from trunk, use the
38
`maas-trunk-xenial` job as the existing item.
39
40
The configuration screen will appear. You can update the MAAS branch to
41
test, the packaging branch to test, and (most importantly) the 
42
`TESTS_BRANCH`. Update the `TESTS_BRANCH` to point to your version
43
of the `qa-lab-tests` repository.