Merge lp:~zulcss/nova/nova-testsuite-fix into lp:~openstack-ubuntu-testing/nova/grizzly

Proposed by Chuck Short
Status: Needs review
Proposed branch: lp:~zulcss/nova/nova-testsuite-fix
Merge into: lp:~openstack-ubuntu-testing/nova/grizzly
Diff against target: 46 lines (+23/-0)
3 files modified
debian/changelog (+2/-0)
debian/patches/fail-tests-check.patch (+20/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~zulcss/nova/nova-testsuite-fix
Reviewer Review Type Date Requested Status
Openstack Ubuntu Testers Pending
Review via email: mp+137652@code.launchpad.net

Description of the change

Currently the package builds succesfully, even when the testsuite fails. This patch modifies the run_test.sh to ftbfs the package when the tests fail.

To post a comment you must log in.
Revision history for this message
Adam Gandelman (gandelman-a) wrote :

This looks okay, but I'm wondering if scraping logs is the best way to detect failures, or if it should rely on the RC from nose, similar to how the other projects currently run_tests: http://paste.ubuntu.com/1408568/

Also, this should really be fixed upstream to avoid another patch.

Revision history for this message
Chuck Short (zulcss) wrote :

Well the correct fix would probably use something like tox

Unmerged revisions

506. By Chuck Short

debian/patches/fail-tests-check.patch: Don't silently ignore tests
failing when building the package.

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 2012-12-03 16:03:17 +0000
3+++ debian/changelog 2012-12-03 18:36:29 +0000
4@@ -3,6 +3,8 @@
5 * New upstream release.
6 * debian/patches/ubuntu-show-tests.patch: Dropped no longer needed.
7 * debian/rules: Run nosetests running in verbose.
8+ * debian/patches/fail-tests-check.patch: Don't silently ignore tests
9+ failing when building the package.
10
11 -- Chuck Short <zulcss@ubuntu.com> Thu, 29 Nov 2012 10:56:31 -0600
12
13
14=== added file 'debian/patches/fail-tests-check.patch'
15--- debian/patches/fail-tests-check.patch 1970-01-01 00:00:00 +0000
16+++ debian/patches/fail-tests-check.patch 2012-12-03 18:36:29 +0000
17@@ -0,0 +1,20 @@
18+Description: Really fail the build when the tests fail.
19+Author: Chuck Short <zulcss@ubuntu.com>
20+Forwarded: no
21+diff -Naurp nova-2013.1.orig/run_tests.sh nova-2013.1/run_tests.sh
22+--- nova-2013.1.orig/run_tests.sh 2012-11-29 10:48:44.000000000 -0600
23++++ nova-2013.1/run_tests.sh 2012-12-03 11:00:01.721425820 -0600
24+@@ -119,6 +119,13 @@ function run_tests {
25+ return 1
26+ fi
27+ fi
28++
29++ tests_failed=$(grep FAILED nosetests.log > /dev/null && rc=$? && echo $rc)
30++ if [ "$tests_failed" -eq 0 ];
31++ then
32++ echo "ERROR: Tests failed"
33++ return 1
34++ fi
35+ return $RESULT
36+ }
37+
38
39=== modified file 'debian/patches/series'
40--- debian/patches/series 2012-11-29 17:00:21 +0000
41+++ debian/patches/series 2012-12-03 18:36:29 +0000
42@@ -4,3 +4,4 @@
43 fix-docs-build-without-network.patch
44 avoid_setuptools_git_dependency.patch
45 fix-libvirt-tests.patch
46+fail-tests-check.patch

Subscribers

People subscribed via source and target branches