Merge lp:~james-page/ubuntu-server-iso-testing/reboot-testing-fixes into lp:ubuntu-server-iso-testing

Proposed by James Page on 2012-03-14
Status: Merged
Merged at revision: 258
Proposed branch: lp:~james-page/ubuntu-server-iso-testing/reboot-testing-fixes
Merge into: lp:ubuntu-server-iso-testing
Diff against target: 182 lines (+48/-89)
2 files modified
debian/copyright (+40/-81)
run-test.py (+8/-8)
To merge this branch: bzr merge lp:~james-page/ubuntu-server-iso-testing/reboot-testing-fixes
Reviewer Review Type Date Requested Status
Jean-Baptiste Lallement 2012-03-14 Approve on 2012-03-14
Review via email: mp+97362@code.launchpad.net

Description of the Change

These updates fix reboot testing to actually work; two issues are resolved.

1) The same test case was being injected for the post reboot tests
2) The results for pre-reboot testing where being collect for post reboot which was incorrect.

I've tested locally with the server test templates for lamp-reboot and lamp.

To post a comment you must log in.
Jean-Baptiste Lallement (jibel) wrote :

looks good. approved

I didn't review the runner on server-tests-precise side

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/copyright'
2--- debian/copyright 2010-12-01 17:48:05 +0000
3+++ debian/copyright 2012-03-14 10:14:18 +0000
4@@ -1,81 +1,40 @@
5-This work was packaged for Debian by:
6-
7- James Page <james.page@canonical.com> on Wed, 01 Dec 2010 08:29:07 +0000
8-
9-Upstream Author(s):
10-
11- James Page <james.page@canonical.com>
12- Mathias Gug <mathiaz@ubuntu.com>
13-
14-Copyright:
15-
16- Copyright (C) 2010 Canonical Ltd (http://www.canonical.com)
17-
18-License:
19-
20- This program is free software: you can redistribute it and/or modify
21- it under the terms of the GNU General Public License as published by
22- the Free Software Foundation, either version 3 of the License, or
23- (at your option) any later version.
24-
25- This package is distributed in the hope that it will be useful,
26- but WITHOUT ANY WARRANTY; without even the implied warranty of
27- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28- GNU General Public License for more details.
29-
30- You should have received a copy of the GNU General Public License
31- along with this program. If not, see <http://www.gnu.org/licenses/>.
32-
33-On Debian systems, the complete text of the GNU General
34-Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
35-
36-
37-File: hudson.py
38-
39-Downloaded from:
40-
41- https://code.ros.org/svn/ros/stacks/ros_release/trunk/hudson/src/hudson.py
42-
43-Upstream Author(s):
44-
45- Ken Conoly (http://kwc.org)
46-
47-Copyright:
48-
49- Copyright (c) 2010, Willow Garage, Inc.
50- All rights reserved.
51-
52-License:
53-
54- Redistribution and use in source and binary forms, with or without
55- modification, are permitted provided that the following conditions
56- are met:
57-
58- * Redistributions of source code must retain the above copyright
59- notice, this list of conditions and the following disclaimer.
60- * Redistributions in binary form must reproduce the above
61- copyright notice, this list of conditions and the following
62- disclaimer in the documentation and/or other materials provided
63- with the distribution.
64- * Neither the name of Willow Garage, Inc. nor the names of its
65- contributors may be used to endorse or promote products derived
66- from this software without specific prior written permission.
67-
68- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
69- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
70- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
71- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
72- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
73- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
74- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
75- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
76- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
77- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
78- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
79- POSSIBILITY OF SUCH DAMAGE.
80-
81-The Debian packaging is:
82-
83- Copyright (C) 2010 Canonical Ltd (http://www.canonical.com)
84-
85-and is licensed under the GPL version 3, see above.
86+Format: http://dep.debian.net/deps/dep5/
87+Upstream-Name: Ubuntu ISO Testing
88+Source: http://launchpad.net/ubuntu-server-iso-testing
89+
90+Files: *
91+Copyright: 2010 Canonical Ltd (http://www.canonical.com)
92+License: GPL-3
93+ On Debian systems, the complete text of the GNU General
94+ Public License version 3 can be found in
95+ "/usr/share/common-licenses/GPL-3".
96+
97+Files: hudson.py
98+Copyright: 2010, Willow Garage, Inc.
99+License: BSD 3-Clause
100+ Redistribution and use in source and binary forms, with or without
101+ modification, are permitted provided that the following conditions
102+ are met:
103+ .
104+ * Redistributions of source code must retain the above copyright
105+ notice, this list of conditions and the following disclaimer.
106+ * Redistributions in binary form must reproduce the above
107+ copyright notice, this list of conditions and the following
108+ disclaimer in the documentation and/or other materials provided
109+ with the distribution.
110+ * Neither the name of Willow Garage, Inc. nor the names of its
111+ contributors may be used to endorse or promote products derived
112+ from this software without specific prior written permission.
113+ .
114+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
115+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
116+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
117+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
118+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
119+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
120+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
121+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
122+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
123+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
124+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
125+ POSSIBILITY OF SUCH DAMAGE.
126
127=== modified file 'run-test.py'
128--- run-test.py 2012-03-01 13:23:20 +0000
129+++ run-test.py 2012-03-14 10:14:18 +0000
130@@ -439,7 +439,8 @@
131 if os.path.exists(post_reboot_test):
132 logging.debug("Adding post-reboot tests")
133 test_case_doc = db[test_uuid]
134- db.put_attachment(test_case_doc, open(t_script),
135+ logging.debug("Test script: %s" % (post_reboot_test))
136+ db.put_attachment(test_case_doc, open(post_reboot_test),
137 filename="post-reboot-tests/%s" % (t_preseed))
138
139 # Allow tests to override the default disk size
140@@ -704,10 +705,10 @@
141 # execute and wrote to CouchDB
142 # Retrieve log output an place in hudson workspace
143 logging.debug("Tests completed for test case %s" % test['_id'])
144-
145 # Iterate over all test results as tests completed OK
146 test_results = test['results']
147 for test_result in test_results:
148+ logging.debug("Storing results for test %s", test_result)
149 test_results_file = os.path.join(testresultsdir, "%s.stderr" % test_result)
150 f = open (test_results_file, 'w')
151 f.write(test['results'][test_result]['script_stderr'])
152@@ -715,25 +716,24 @@
153 test_results_file = os.path.join(testresultsdir, "TEST-%s.xml" % test_result)
154 f = open (test_results_file, 'w')
155 f.write(test['results'][test_result]['script_stdout'])
156- f.close()
157-
158+ f.close()
159 test_completed = True
160 else:
161 logging.debug("VM for test case %s powered off but tests not completed" % test['_id'])
162
163 if test['states'].has_key('rebooted'):
164 logging.debug("Test case %s rebooted." % test['_id'])
165-
166 post_reboot_results = test['post-reboot-results']
167 for test_result in post_reboot_results:
168+ logging.debug("Storing results for test %s", test_result)
169 test_results_file = os.path.join(testresultsdir, "post-reboot-%s.stderr" % test_result)
170 f = open (test_results_file, 'w')
171- f.write(test['results'][test_result]['script_stderr'])
172+ f.write(test['post-reboot-results'][test_result]['script_stderr'])
173 f.close()
174 test_results_file = os.path.join(testresultsdir, "TEST-POST-REBOOT-%s.xml" % test_result)
175 f = open (test_results_file, 'w')
176- f.write(test['results'][test_result]['script_stdout'])
177- f.close()
178+ f.write(test['post-reboot-results'][test_result]['script_stdout'])
179+ f.close()
180
181 # save D-I logs no matter what (if they exist, of course)
182 if os.path.isfile(syslog_path):

Subscribers

People subscribed via source and target branches