Merge lp:~zulcss/nova/nova-testr into lp:~openstack-ubuntu-testing/nova/grizzly
- nova-testr
- Merge into grizzly
Proposed by
Chuck Short
Status: | Merged |
---|---|
Merged at revision: | 549 |
Proposed branch: | lp:~zulcss/nova/nova-testr |
Merge into: | lp:~openstack-ubuntu-testing/nova/grizzly |
Diff against target: |
289 lines (+32/-220) 3 files modified
debian/changelog (+3/-1) debian/patches/fix-ubuntu-tests.patch (+28/-218) debian/rules (+1/-1) |
To merge this branch: | bzr merge lp:~zulcss/nova/nova-testr |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Openstack Ubuntu Testers | Pending | ||
Review via email: mp+145020@code.launchpad.net |
Commit message
Description of the change
fixes ftbfs.
To post a comment you must log in.
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-01-23 22:23:41 +0000 |
3 | +++ debian/changelog 2013-01-25 20:32:20 +0000 |
4 | @@ -1,4 +1,4 @@ |
5 | -nova (2013.1~g2-0ubuntu4) UNRELEASED; urgency=low |
6 | +nova (2013.1~g2-0ubuntu3) UNRELEASED; urgency=low |
7 | |
8 | [ Chuck Short ] |
9 | * New usptream release. |
10 | @@ -7,6 +7,8 @@ |
11 | * debian/control, debian/nova-spiceproxy.{install, logrotate, upstart}: |
12 | Add spice html5 proxy support. |
13 | * debian/nova-novncproxy.upstart: Start on runlevel [2345] |
14 | + * debian/rules: Call testr directly since run_tests.sh -N gives weird return |
15 | + value when tests pass. |
16 | |
17 | [ Adam Gandelman ] |
18 | * debian/control: Fix typo (websocikfy -> websockify). |
19 | |
20 | === modified file 'debian/patches/fix-ubuntu-tests.patch' |
21 | --- debian/patches/fix-ubuntu-tests.patch 2013-01-22 17:59:02 +0000 |
22 | +++ debian/patches/fix-ubuntu-tests.patch 2013-01-25 20:32:20 +0000 |
23 | @@ -1,210 +1,31 @@ |
24 | -From cec3e170c1727aa35d4c0229d8cd79f4c1c7f4d1 Mon Sep 17 00:00:00 2001 |
25 | -From: Chuck Short <chuck.short@canonical.com> |
26 | -Date: Tue, 22 Jan 2013 11:58:18 -0600 |
27 | -Subject: [PATCH] fix |
28 | - |
29 | -Signed-off-by: Chuck Short <chuck.short@canonical.com> |
30 | ---- |
31 | - nova/tests/baremetal/test_pxe.py | 2 ++ |
32 | - nova/tests/test_api.py | 2 +- |
33 | - nova/tests/test_image_utils.py | 9 +++++++++ |
34 | - nova/tests/test_imagebackend.py | 5 +++++ |
35 | - nova/tests/test_libvirt.py | 3 +++ |
36 | - nova/tests/test_libvirt_utils.py | 1 + |
37 | - tools/hacking.py | 3 +-- |
38 | - 7 files changed, 22 insertions(+), 3 deletions(-) |
39 | - |
40 | -diff --git a/nova/tests/baremetal/test_pxe.py b/nova/tests/baremetal/test_pxe.py |
41 | -index 73ef8ca..26d2358 100644 |
42 | ---- a/nova/tests/baremetal/test_pxe.py |
43 | -+++ b/nova/tests/baremetal/test_pxe.py |
44 | -@@ -319,6 +319,7 @@ class PXEPrivateMethodsTestCase(BareMetalPXETestCase): |
45 | - self.assertEqual(macs, address_list) |
46 | - |
47 | - def test_cache_tftp_images(self): |
48 | -+ self.skipTest('fails on buildds') |
49 | - self.instance['kernel_id'] = 'aaaa' |
50 | - self.instance['ramdisk_id'] = 'bbbb' |
51 | - extra_specs = { |
52 | -@@ -341,6 +342,7 @@ class PXEPrivateMethodsTestCase(BareMetalPXETestCase): |
53 | - self.mox.VerifyAll() |
54 | - |
55 | - def test_cache_image(self): |
56 | -+ self.skipTest('fails on buildds') |
57 | - self.mox.StubOutWithMock(os, 'makedirs') |
58 | - self.mox.StubOutWithMock(os.path, 'exists') |
59 | - os.makedirs(pxe.get_image_dir_path(self.instance)).\ |
60 | -diff --git a/nova/tests/test_api.py b/nova/tests/test_api.py |
61 | -index fb2e76e..4cc3648 100644 |
62 | ---- a/nova/tests/test_api.py |
63 | -+++ b/nova/tests/test_api.py |
64 | -@@ -434,7 +434,7 @@ class ApiEc2TestCase(test.TestCase): |
65 | - raise self.failureException, 'EC2ResponseError not raised' |
66 | - |
67 | - # Invalid CIDR address |
68 | -- _assert('Invalid CIDR', 'tcp', 80, 81, '0.0.0.0/0444') |
69 | -+ #_assert('Invalid CIDR', 'tcp', 80, 81, '0.0.0.0/0444') |
70 | - # Missing ports |
71 | - _assert('Not enough parameters', 'tcp', '0.0.0.0/0') |
72 | - # from port cannot be greater than to port |
73 | -diff --git a/nova/tests/test_image_utils.py b/nova/tests/test_image_utils.py |
74 | -index a9768f8..7e6e889 100644 |
75 | ---- a/nova/tests/test_image_utils.py |
76 | -+++ b/nova/tests/test_image_utils.py |
77 | -@@ -25,6 +25,7 @@ from nova.virt.libvirt import utils as libvirt_utils |
78 | - |
79 | - class ImageUtilsTestCase(test.TestCase): |
80 | - def test_disk_type(self): |
81 | -+ self.skipTest('fails on buildds') |
82 | - # Seems like lvm detection |
83 | - # if its in /dev ?? |
84 | - for p in ['/dev/b', '/dev/blah/blah']: |
85 | -@@ -54,6 +55,7 @@ disk size: 96K |
86 | - self.mox.UnsetStubs() |
87 | - |
88 | - def test_disk_backing(self): |
89 | -+ self.skipTest('skipped by ubuntu buildds') |
90 | - path = '/myhome/disk.config' |
91 | - template_output = """image: %(path)s |
92 | - file format: raw |
93 | -@@ -74,6 +76,7 @@ disk size: 96K |
94 | - self.assertEquals(None, d_backing) |
95 | - |
96 | - def test_disk_size(self): |
97 | -+ self.skipTest('fails on buildds') |
98 | - path = '/myhome/disk.config' |
99 | - template_output = """image: %(path)s |
100 | - file format: raw |
101 | -@@ -115,6 +118,7 @@ disk size: 96K |
102 | - self.mox.UnsetStubs() |
103 | - |
104 | - def test_qemu_info_canon(self): |
105 | -+ self.skipTest('skipped on ubuntu') |
106 | - path = "disk.config" |
107 | - example_output = """image: disk.config |
108 | - file format: raw |
109 | -@@ -137,6 +141,7 @@ blah BLAH: bb |
110 | - self.assertEquals(65536, image_info.cluster_size) |
111 | - |
112 | - def test_qemu_info_canon2(self): |
113 | -+ self.skipTest('skipped on ubuntu') |
114 | - path = "disk.config" |
115 | - example_output = """image: disk.config |
116 | - file format: QCOW2 |
117 | -@@ -161,6 +166,7 @@ backing file: /var/lib/nova/a328c7998805951a_2 |
118 | - image_info.backing_file) |
119 | - |
120 | - def test_qemu_backing_file_actual(self): |
121 | -+ return True |
122 | - path = "disk.config" |
123 | - example_output = """image: disk.config |
124 | - file format: raw |
125 | -@@ -188,6 +194,7 @@ backing file: /var/lib/nova/a328c7998805951a_2 (actual path: /b/3a988059e51a_2) |
126 | - image_info.backing_file) |
127 | - |
128 | - def test_qemu_info_convert(self): |
129 | -+ return True |
130 | - path = "disk.config" |
131 | - example_output = """image: disk.config |
132 | - file format: raw |
133 | -@@ -213,6 +220,8 @@ junk stuff: bbb |
134 | - self.assertEquals(98304, image_info.disk_size) |
135 | - |
136 | - def test_qemu_info_snaps(self): |
137 | -+ return True |
138 | -+ self.skipTest('fails on buildds') |
139 | - path = "disk.config" |
140 | - example_output = """image: disk.config |
141 | - file format: raw |
142 | -diff --git a/nova/tests/test_imagebackend.py b/nova/tests/test_imagebackend.py |
143 | -index a9865cb..703d782 100644 |
144 | ---- a/nova/tests/test_imagebackend.py |
145 | -+++ b/nova/tests/test_imagebackend.py |
146 | -@@ -54,6 +54,7 @@ class _ImageTestCase(object): |
147 | - fake_libvirt_utils)) |
148 | - |
149 | - def test_cache(self): |
150 | -+ self.skipTest('fails on buildds') |
151 | - self.mox.StubOutWithMock(os.path, 'exists') |
152 | - os.path.exists(self.PATH).AndReturn(False) |
153 | - os.path.exists(self.TEMPLATE_DIR).AndReturn(False) |
154 | -@@ -71,6 +72,7 @@ class _ImageTestCase(object): |
155 | - self.mox.VerifyAll() |
156 | - |
157 | - def test_cache_image_exists(self): |
158 | -+ self.skipTest('fails on buildds') |
159 | - self.mox.StubOutWithMock(os.path, 'exists') |
160 | - os.path.exists(self.PATH).AndReturn(True) |
161 | - self.mox.ReplayAll() |
162 | -@@ -81,6 +83,7 @@ class _ImageTestCase(object): |
163 | - self.mox.VerifyAll() |
164 | - |
165 | - def test_cache_base_dir_exists(self): |
166 | -+ self.skipTest('skipped fails on buildds') |
167 | - self.mox.StubOutWithMock(os.path, 'exists') |
168 | - os.path.exists(self.PATH).AndReturn(False) |
169 | - os.path.exists(self.TEMPLATE_DIR).AndReturn(True) |
170 | -@@ -97,6 +100,7 @@ class _ImageTestCase(object): |
171 | - self.mox.VerifyAll() |
172 | - |
173 | - def test_cache_template_exists(self): |
174 | -+ self.skipTest('skipped fails on buildds') |
175 | - self.mox.StubOutWithMock(os.path, 'exists') |
176 | - os.path.exists(self.PATH).AndReturn(False) |
177 | - os.path.exists(self.TEMPLATE_DIR).AndReturn(True) |
178 | -@@ -193,6 +197,7 @@ class Qcow2TestCase(_ImageTestCase, test.TestCase): |
179 | - self.mox.VerifyAll() |
180 | - |
181 | - def test_create_image_with_size(self): |
182 | -+ self.skipTest('fails on ubuntu buildds') |
183 | - fn = self.prepare_mocks() |
184 | - fn(target=self.TEMPLATE_PATH) |
185 | - self.mox.StubOutWithMock(os.path, 'exists') |
186 | -diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py |
187 | -index 83b7f43..cbdf5e5 100644 |
188 | ---- a/nova/tests/test_libvirt.py |
189 | -+++ b/nova/tests/test_libvirt.py |
190 | -@@ -2603,6 +2603,7 @@ class LibvirtConnTestCase(test.TestCase): |
191 | - db.instance_destroy(self.context, instance_ref['uuid']) |
192 | - |
193 | - def test_get_instance_disk_info_works_correctly(self): |
194 | -+ self.skipTest('fails on buidds') |
195 | - # Test data |
196 | - instance_ref = db.instance_create(self.context, self.test_instance) |
197 | - dummyxml = ("<domain type='kvm'><name>instance-0000000a</name>" |
198 | -@@ -4235,6 +4236,7 @@ class LibvirtUtilsTestCase(test.TestCase): |
199 | - libvirt_utils.create_image('qcow2', '/some/stuff', '1234567891234') |
200 | - |
201 | - def test_create_cow_image(self): |
202 | -+ self.skipTest('fails on buildds') |
203 | - self.mox.StubOutWithMock(os.path, 'exists') |
204 | - self.mox.StubOutWithMock(utils, 'execute') |
205 | - rval = ('', '') |
206 | -@@ -4262,6 +4264,7 @@ class LibvirtUtilsTestCase(test.TestCase): |
207 | - self.assertEquals(result, expected_result) |
208 | - |
209 | - def test_get_disk_size(self): |
210 | -+ self.skipTest('fails on ubuntu buildds') |
211 | - self.mox.StubOutWithMock(os.path, 'exists') |
212 | - self.mox.StubOutWithMock(utils, 'execute') |
213 | - os.path.exists('/some/path').AndReturn(True) |
214 | -diff --git a/nova/tests/test_libvirt_utils.py b/nova/tests/test_libvirt_utils.py |
215 | -index 60f0682..d395ac8 100644 |
216 | ---- a/nova/tests/test_libvirt_utils.py |
217 | -+++ b/nova/tests/test_libvirt_utils.py |
218 | -@@ -24,6 +24,7 @@ from nova.virt.libvirt import utils as libvirt_utils |
219 | - |
220 | - class LibvirtUtilsTestCase(test.TestCase): |
221 | - def test_get_disk_type(self): |
222 | -+ self.skipTest('fails on buildds') |
223 | - path = "disk.config" |
224 | - example_output = """image: disk.config |
225 | - file format: raw |
226 | -diff --git a/tools/hacking.py b/tools/hacking.py |
227 | -index 56f6694..5713435 100755 |
228 | ---- a/tools/hacking.py |
229 | -+++ b/tools/hacking.py |
230 | -@@ -565,7 +565,7 @@ if __name__ == "__main__": |
231 | +diff -Naurp nova-2013.1.orig/nova/tests/test_api.py nova-2013.1/nova/tests/test_api.py |
232 | +--- nova-2013.1.orig/nova/tests/test_api.py 2013-01-25 05:53:44.000000000 -0600 |
233 | ++++ nova-2013.1/nova/tests/test_api.py 2013-01-25 14:21:21.514255459 -0600 |
234 | +@@ -26,9 +26,9 @@ from boto.ec2 import regioninfo |
235 | + from boto import exception as boto_exc |
236 | + # newer versions of boto use their own wrapper on top of httplib.HTTPResponse |
237 | + try: |
238 | +- import boto.connection as httplib |
239 | ++ from boto.connection import HTTPResponse |
240 | + except ImportError: |
241 | +- import httplib |
242 | ++ from httplib import HTTPResponse |
243 | + import fixtures |
244 | + import webob |
245 | + |
246 | +@@ -79,7 +79,7 @@ class FakeHttplibConnection(object): |
247 | + # guess that's a function the web server usually provides. |
248 | + resp = "HTTP/1.0 %s" % resp |
249 | + self.sock = FakeHttplibSocket(resp) |
250 | +- self.http_response = httplib.HTTPResponse(self.sock) |
251 | ++ self.http_response = HTTPResponse(self.sock) |
252 | + # NOTE(vish): boto is accessing private variables for some reason |
253 | + self._HTTPConnection__response = self.http_response |
254 | + self.http_response.begin() |
255 | +diff -Naurp nova-2013.1.orig/tools/hacking.py nova-2013.1/tools/hacking.py |
256 | +--- nova-2013.1.orig/tools/hacking.py 2013-01-25 05:53:45.000000000 -0600 |
257 | ++++ nova-2013.1/tools/hacking.py 2013-01-25 14:21:11.742255454 -0600 |
258 | +@@ -571,7 +571,7 @@ if __name__ == "__main__": |
259 | #include nova path |
260 | sys.path.append(os.getcwd()) |
261 | #Run once tests (not per line) |
262 | @@ -213,14 +34,3 @@ |
263 | #NOVA error codes start with an N |
264 | pep8.SELFTEST_REGEX = re.compile(r'(Okay|[EWN]\d{3}):\s(.*)') |
265 | pep8.ERRORCODE_REGEX = re.compile(r'[EWN]\d{3}') |
266 | -@@ -580,7 +580,6 @@ if __name__ == "__main__": |
267 | - |
268 | - try: |
269 | - pep8._main() |
270 | -- sys.exit(once_error) |
271 | - finally: |
272 | - if len(_missingImport) > 0: |
273 | - print >> sys.stderr, ("%i imports missing in this test environment" |
274 | --- |
275 | -1.8.0 |
276 | - |
277 | |
278 | === modified file 'debian/rules' |
279 | --- debian/rules 2013-01-10 19:20:37 +0000 |
280 | +++ debian/rules 2013-01-25 20:32:20 +0000 |
281 | @@ -58,7 +58,7 @@ |
282 | |
283 | ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) |
284 | override_dh_auto_test: |
285 | - ./run_tests.sh -N |
286 | + testr init && test run --parallel |
287 | endif |
288 | |
289 | override_dh_python2: |