Merge lp:~javier.collado/utah/bug1178650 into lp:utah

Proposed by Javier Collado
Status: Merged
Approved by: Javier Collado
Approved revision: 907
Merged at revision: 906
Proposed branch: lp:~javier.collado/utah/bug1178650
Merge into: lp:utah
Diff against target: 138 lines (+19/-53)
6 files modified
debian/changelog (+1/-0)
docs/Makefile (+1/-0)
docs/source/conf.py (+13/-0)
docs/source/introduction.rst (+3/-48)
examples/run_utah_tests.py (+1/-3)
utah/config.py (+0/-2)
To merge this branch: bzr merge lp:~javier.collado/utah/bug1178650
Reviewer Review Type Date Requested Status
Andy Doan (community) Approve
Review via email: mp+163314@code.launchpad.net

Description of the change

This branch removes hardy and oneiric from the default values since they are
not supported anymore.

Besides this, it automates the run_utah_tests.py help output in the
documentation so that it's generated from the source code.

To post a comment you must log in.
Revision history for this message
Andy Doan (doanac) wrote :

As per:

32 +# Generate file being included in the introduction

nice trick!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-05-09 23:36:07 +0000
3+++ debian/changelog 2013-05-10 12:37:25 +0000
4@@ -8,6 +8,7 @@
5 * Apply retry strategy to install UTAH client package (LP: #1175732)
6 * Added phoenix manpage (LP: #1067704)
7 * Apply all overrides in tslist.run to the test cases (LP: #1178238)
8+ * Removed unsupported distributions from defaults (LP: #1178650)
9
10 -- Javier Collado <javier.collado@canonical.com> Tue, 07 May 2013 16:06:48 +0200
11
12
13=== modified file 'docs/Makefile'
14--- docs/Makefile 2012-09-05 07:43:32 +0000
15+++ docs/Makefile 2013-05-10 12:37:25 +0000
16@@ -40,6 +40,7 @@
17
18 clean:
19 -rm -rf $(BUILDDIR)/*
20+ -rm source/*.txt # Autogenerated content for introduction section
21 -rm source/man/*.txt # Autogenerated content for man pages
22
23 html:
24
25=== modified file 'docs/source/conf.py'
26--- docs/source/conf.py 2013-05-08 13:28:00 +0000
27+++ docs/source/conf.py 2013-05-10 12:37:25 +0000
28@@ -149,6 +149,19 @@
29
30 return description, options, epilog
31
32+# Generate file being included in the introduction
33+module_name = 'run_utah_tests'
34+module = __import__(module_name)
35+parser = module.get_parser()
36+filename = '{}.txt'.format(module_name)
37+with open(filename, 'w') as f:
38+ lines = [' {}'.format(line)
39+ for line in parser.format_help().splitlines()]
40+ lines.insert(0, '::\n\n')
41+ f.write('\n'.join(lines))
42+
43+
44+# Generate files included by man pages
45 module_and_script_names = (
46 ('client', 'utah'),
47 ('run_utah_tests', 'run_utah_tests.py'),
48
49=== modified file 'docs/source/introduction.rst'
50--- docs/source/introduction.rst 2012-10-26 09:47:09 +0000
51+++ docs/source/introduction.rst 2013-05-10 12:37:25 +0000
52@@ -86,54 +86,9 @@
53 just the test runner, install the utah-client package.
54
55
56-Usage of run_utah_tests.py:
57-
58-::
59-
60- Usage: run_utah_tests.py [-h]
61- [-m {physical,virtual}]
62- [-i IMAGE] [-k KERNEL] [-r INITRD] [-p PRESEED]
63- [-s {hardy,lucid,natty,oneiric,precise,quantal}]
64- [-t {desktop,server,mini,alternate}]
65- [-a {i386,amd64,arm}] [-v VARIANT]
66- [-n] [-d] [-j]
67- runlist [runlist ...]
68-
69- Provision a machine and run one or more UTAH runlists there.
70-
71- positional arguments:
72- runlist URLs of runlist files to run
73-
74- optional arguments:
75- -h, --help show this help message and exit
76- -m {physical,virtual}, --machinetype {physical,virtual}
77- Type of machine to provision
78- -i IMAGE, --image IMAGE
79- Image/ISO file to use for installation
80- -k KERNEL, --kernel KERNEL
81- Kernel file to use for installation
82- -r INITRD, --initrd INITRD
83- InitRD file to use for installation
84- -p PRESEED, --preseed PRESEED
85- Preseed file to use for installation
86- -s {hardy,lucid,natty,oneiric,precise,quantal}, --series {hardy,lucid,natty,oneiric,precise,quantal}
87- Series to use for installation
88- -t {desktop,server,mini,alternate}, --type {desktop,server,mini,alternate}
89- Install type to use for installation
90- -a {i386,amd64,arm}, --arch {i386,amd64,arm}
91- Architecture to use for installation
92- -v VARIANT, --variant VARIANT
93- Variant of architecture, i.e., armel, armhf
94- -n, --no-destroy Preserve machine after tests have run
95- -d, --debug Enable debug logging
96- -j, --json Enable json logging (default is YAML)
97-
98-For example::
99-
100- sudo -i -u utah /usr/share/utah/examples/run_utah_tests.py \
101- -s precise -t server -a i386 \
102- /usr/share/utah/client/examples/master.run \
103- 'http://people.canonical.com/~max/max_test.run'
104+Usage of ``run_utah_tests.py``:
105+
106+.. include:: run_utah_tests.txt
107
108 How to start writing tests?
109 ---------------------------
110
111=== modified file 'examples/run_utah_tests.py'
112--- examples/run_utah_tests.py 2013-05-01 23:57:13 +0000
113+++ examples/run_utah_tests.py 2013-05-10 12:37:25 +0000
114@@ -62,9 +62,7 @@
115 def get_parser():
116 parser = argparse.ArgumentParser(
117 description=('Provision a machine '
118- 'and run one or more UTAH runlists there.\n\n'
119- 'The appropriate run_*.py script will be called, '
120- 'depending on the parameters passed.'),
121+ 'and run one or more UTAH runlists there.'),
122 epilog=("For example:\n"
123 "Provision a VM using a precise server image "
124 "with i386 architecture and run the given runlist\n"
125
126=== modified file 'utah/config.py'
127--- utah/config.py 2013-05-03 23:07:50 +0000
128+++ utah/config.py 2013-05-10 12:37:25 +0000
129@@ -159,9 +159,7 @@
130 runtimeout=None,
131 # Available releases
132 serieschoices=[
133- 'hardy',
134 'lucid',
135- 'oneiric',
136 'precise',
137 'quantal',
138 'raring',

Subscribers

People subscribed via source and target branches