[Python-modules-commits] r18875 - in packages/sphinx/trunk/debian (3 files)
jwilk at users.alioth.debian.org
jwilk at users.alioth.debian.org
Wed Oct 12 09:30:18 UTC 2011
Date: Wednesday, October 12, 2011 @ 09:30:16
Author: jwilk
Revision: 18875
Make the build actually fail if integration tests for the JavaScript code fail.
Modified:
packages/sphinx/trunk/debian/changelog
packages/sphinx/trunk/debian/jstest/jstest.py
packages/sphinx/trunk/debian/jstest/run-tests
Modified: packages/sphinx/trunk/debian/changelog
===================================================================
--- packages/sphinx/trunk/debian/changelog 2011-10-12 08:57:57 UTC (rev 18874)
+++ packages/sphinx/trunk/debian/changelog 2011-10-12 09:30:16 UTC (rev 18875)
@@ -2,6 +2,8 @@
* Update version numbers in the manual pages. Add a build-time warning to be
emitted if they ever get out of date again.
+ * Make the build actually fail if integration tests for the JavaScript code
+ fail.
-- Jakub Wilk <jwilk at debian.org> Wed, 12 Oct 2011 10:46:05 +0200
Modified: packages/sphinx/trunk/debian/jstest/jstest.py
===================================================================
--- packages/sphinx/trunk/debian/jstest/jstest.py 2011-10-12 08:57:57 UTC (rev 18874)
+++ packages/sphinx/trunk/debian/jstest/jstest.py 2011-10-12 09:30:16 UTC (rev 18875)
@@ -152,7 +152,7 @@
TestCase.__name__ = 'TestCase(%r)' % options.search_term
suite = unittest.TestLoader().loadTestsFromTestCase(TestCase)
- unittest.TextTestRunner(verbosity=2).run(suite)
+ return unittest.TextTestRunner(verbosity=2).run(suite)
def test_directory(directory, options, time_limit=default_time_limit):
# The file:/// protocol doesn't work for the time being:
@@ -162,7 +162,7 @@
url = urlparse.urljoin(http_server.base_url, 'search.html?q=' + urllib.quote_plus(options.search_term))
browser = Browser(options)
html = browser.wget(url, time_limit)
- test_html(html, options)
+ return test_html(html, options)
def main():
import argparse
Modified: packages/sphinx/trunk/debian/jstest/run-tests
===================================================================
--- packages/sphinx/trunk/debian/jstest/run-tests 2011-10-12 08:57:57 UTC (rev 18874)
+++ packages/sphinx/trunk/debian/jstest/run-tests 2011-10-12 09:30:16 UTC (rev 18875)
@@ -1,6 +1,7 @@
#!/usr/bin/python
import os
+import sys
import jstest
@@ -27,7 +28,10 @@
raise RuntimeError('These tests requires access to an X server')
build_directory = os.path.join(os.path.dirname(__file__), '..', '..', 'build', 'html')
build_directory = os.path.abspath(build_directory)
+ n_failures = 0
for testcase in t1, t2, t3:
- jstest.test_directory(build_directory, testcase)
+ failures = jstest.test_directory(build_directory, testcase).failures
+ n_failures += len(failures)
+ sys.exit(n_failures > 0)
# vim:ts=4 sw=4 et
More information about the Python-modules-commits
mailing list