Merge lp:~joetalbott/utah/docs_update_for_phoenix into lp:utah

Proposed by Joe Talbott
Status: Merged
Approved by: Javier Collado
Approved revision: 715
Merged at revision: 717
Proposed branch: lp:~joetalbott/utah/docs_update_for_phoenix
Merge into: lp:utah
Diff against target: 141 lines (+41/-34)
1 file modified
docs/source/development.rst (+41/-34)
To merge this branch: bzr merge lp:~joetalbott/utah/docs_update_for_phoenix
Reviewer Review Type Date Requested Status
Javier Collado (community) Approve
Joe Talbott (community) Needs Resubmitting
Max Brustkern (community) Approve
Review via email: mp+130238@code.launchpad.net

Description of the change

Cleanup the documentation a bit and add some phoenix instructions.

To post a comment you must log in.
Revision history for this message
Max Brustkern (nuclearbob) wrote :

Looks good to me.

review: Approve
Revision history for this message
Javier Collado (javier.collado) wrote :

To have the source code boxes with the phoenix example, end the sentence with two colons (::) instead of just one (:). There are few examples in the document itself.

Did you want to apply some emphasis to the words between single quotes? If that's the case, then use either stars (**bold**) or double backquotes (``fixed width``).

review: Needs Fixing
714. By Joe Talbott

Fix some markup mistakes.

Pointed-Out-By: jcollado

Revision history for this message
Joe Talbott (joetalbott) wrote :

Good catch. Fixed.

review: Needs Resubmitting
Revision history for this message
Javier Collado (javier.collado) wrote :

@Joe

Thanks for updating the markup.

There are still a few single quotes in the last paragraph that starts with "The
only required fields are". I guess you'll want to update them as well to be
consistent with the previous section.

Also, "Include_tests" and "Exclude_tests" are capitalized, I think I'd keep the
same case as in the yaml file for the sake of clarity.

review: Needs Fixing
Revision history for this message
Javier Collado (javier.collado) wrote :

Just to make sure that we look at the same html, the steps I follow are:
- cd docs
- make html
- open docs/build/html/index.html

When working on the source code, vim provides good highlighting for .rst files
(I'm not sure about other editors).

715. By Joe Talbott

Fix markup

Revision history for this message
Joe Talbott (joetalbott) wrote :

Should be fixed now. I'm getting errors in the 'make html' step so I can't confirm the output locally.

review: Needs Resubmitting
Revision history for this message
Javier Collado (javier.collado) wrote :

@Joe

Yes, looks good to me now. Thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'docs/source/development.rst'
2--- docs/source/development.rst 2012-10-10 14:44:00 +0000
3+++ docs/source/development.rst 2012-10-19 16:46:21 +0000
4@@ -1,4 +1,4 @@
5-Cool, and how do I start developing for it?
6+How do I start developing for it?
7 ===========================================
8
9 Ubuntu Test Automation Harness will allow developers to quickly and reliably
10@@ -39,19 +39,33 @@
11
12 This is what a UTAH test suite looks like::
13
14- .
15- |-- testsuite1
16- | |-- testcase1
17- | | |-- Makefile
18- | | |-- t1.c
19- | | `-- tc_control
20- | |-- testcase2
21- | | |-- test.py
22- | | `-- tc_control
23- | |-- ts_control
24- | `-- tslist.run
25- |-- testsuite2
26- |-- master.run
27+ testsuite1/
28+ tslist.run
29+ ts_control
30+ testcase1/
31+ tc_control
32+ Makefile
33+ test.c
34+ testcase2/
35+ tc_control
36+ test.py
37+
38+Phoenix - A tool for creating testsuite and testcase skeletons.
39+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40+
41+Part of the ``utah-client`` is ``phoenix`` which makes getting started creating testsuites a bit easier. It can be used like this::
42+
43+ phoenix example_testsuite example1 example2
44+
45+This creates a testsuite directory ``example_testsuite`` in the current directory with two testcase directories ``example1`` and ``example2`` inside. In addition a tslist.run, ts_control, and tc_control files for each testcase. A master.run file is created as well to aid in development. NOTE: the master.run file will generally be written by a person wishing to run a set of testsuites and/or testcases and will not be a part of a testsuite.
46+
47+To add a testcase to an existing testsuite::
48+
49+ phoenix example_testsuite example3
50+
51+This will add an ``example3`` testcase directory to the example_testsuite testsuite as well as adding an entry to the testsuite's tslist.run. From within a testsuite directory this can be shortened to::
52+
53+ phoenix . example3
54
55 Runlists Hierarchy
56 ~~~~~~~~~~~~~~~~~~
57@@ -63,7 +77,7 @@
58 ::
59
60 - name: testsuite1
61- fetch_method : git
62+ fetch_method: git
63 fetch_location: repo
64 include_tests:
65 - t1
66@@ -71,15 +85,17 @@
67 - t3...
68
69 - name: testsuite2
70+ fetch_method: bzr
71+ fetch_location: lp:utah/dev/
72 exclude_tests:
73 - st4
74 - st5
75
76-The only required fields are 'name', 'fetch_method' and 'fetch_location'. 'Name' must correspond to the name of the top-level testsuite directory. 'Fetch_method' should be one of 'bzr', 'bzr-export', or 'git'. 'Fetch_location' should be a valid location for the supplied 'fetch_method'. If 'bzr' is selected as the fetch method then 'fetch_location' should point to a repository that is a valid testsuite, i.e. has a tslist.run, ts_control (if needed), and test case directories. While 'bzr' does a 'bzr branch' in the implementation, 'bzr-export' does a 'bzr export' and accepts a bzr location that can point to a sub-directory within a repository that is a valid testsuite.
77-
78-One caveat to note is that a 'fetch_method' of 'bzr' will get the revision information from the local copy of the branched repository but 'bzr-export' will have a small race condition between the 'get' and 'revision' calls since the actual bzr repository must be queried for the revision.
79-
80-'Include_tests' will limit the testcases that are run to only those listed by this option. 'Exclude_tests' will run all the tests in the testsuite's tslist.run file except those listed by this option.
81+The only required fields are ``name``, ``fetch_method`` and ``fetch_location``. ``name`` must correspond to the name of the top-level testsuite directory. ``fetch_method`` should be one of ``bzr``, ``bzr-export``, or ``git``. ``fetch_location`` should be a valid location for the supplied ``fetch_method``. If ``bzr`` is selected as the fetch method then ``fetch_location`` should point to a repository that is a valid testsuite, i.e. has a tslist.run, ts_control (if needed), and test case directories. While ``bzr`` does a ``bzr branch`` in the implementation, ``bzr-export`` does a ``bzr export`` and accepts a bzr location that can point to a sub-directory within a repository that is a valid testsuite.
82+
83+One caveat to note is that a ``fetch_method`` of ``bzr`` will get the revision information from the local copy of the branched repository but ``bzr-export`` will have a small race condition between the ``get`` and ``revision`` calls since the actual bzr repository must be queried for the revision.
84+
85+``include_tests`` will limit the testcases that are run to only those listed by this option. ``exclude_tests`` will run all the tests in the testsuite's tslist.run file except those listed by this option.
86
87 Test suites can be divided in categories (for our internal use, or for test
88 cases submitted to our test case base) or they can be in a repository anywhere.
89@@ -119,11 +135,7 @@
90 called *sample_tests* and the entry in ``tslist.run`` for test is *test_one*
91 then the path to the test folder will be *sample_tests/test_one*.
92
93- * ``tslist.run``'s **command** is relative to the testcase’s folder. So the
94- above test with a **command** of ``python test_one.py`` will result in this
95- effectively::
96-
97- cd sample_tests/test_one && python test_one.py
98+ * ``tslist.run``'s **overrides** are the same options available in the ``tc_control`` file and take precedence over those found in ``tc_control``.
99
100 * ``ts_control`` is optional.
101 * if ``build_cmd``, or ``ts_setup`` fails no tests in the suite will be run.
102@@ -134,7 +146,7 @@
103 the test fails.
104
105 Each test case, with all the code required for it to compile or run, lives in a
106-folder, and contains also a control file that **includes its documentation**
107+directory, and contains also a control file that **includes its documentation**
108 amongst other things:
109
110 **tc_control file contains:**
111@@ -144,15 +156,14 @@
112 build_cmd: make # or scons or build.sh
113 command: python test1.py a1 a2 a3 # command to run the test from within t1
114 description:
115- ( tc_id: TC-INSTALL-ALTERNATE-01)
116- dependencies:
117+ dependencies: coreutils
118 actions: |
119 1. Action 1
120 2. Action 2
121 expected_results: |
122 1. Expected result 1
123 2. Expected result 2
124- type: build_only/userland/kernel (?)
125+ type: userland/kernel # currently unimplemented
126 timeout: 100
127 tc_setup: t1/t1 setup # in case the test case has a setup
128 tc_cleanup: t1/t1 cleanup # in case the test has a cleanup
129@@ -169,11 +180,7 @@
130 that the harness can run their setup and clean up functions.
131
132 **In terms of settings precedence:**
133-The test suite control file provides a default value for all the test cases in
134-the test suite. Each test case can override those settings in its own control
135-file. The overrides in the suite level runlist override both of them (the idea
136-behind being to be able to set up different timeouts depending on the
137-architecture the tests ought to be run on, if necessary).
138+The test case control file (``tc_control``) provides the default values for the options available for the testcase. The **overrides** in ``tslist.run`` take precedence over those options in the ``tc_control`` file.
139
140 How to use custom preseeds
141 --------------------------

Subscribers

People subscribed via source and target branches