← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~frankban/launchpad/bug-1012314-sphinx-build into lp:launchpad

 

Francesco Banconi has proposed merging lp:~frankban/launchpad/bug-1012314-sphinx-build into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1012314 in Launchpad itself: "lp.scripts.tests.test_sphinxdocs.TestSphinxDocumentation.test_docs_build_without_error fails intermittently/rarely"
  https://bugs.launchpad.net/launchpad/+bug/1012314

For more details, see:
https://code.launchpad.net/~frankban/launchpad/bug-1012314-sphinx-build/+merge/110093

= Summary =

TestSphinxDocumentation.test_docs_build_without_error fails intermittently/rarely due to _LockWarner garbage.

== Proposed fix ==

I will follow the direction suggested in the bug description: just check the return code and add stdout and stderr as details (if something goes wrong).

== Implementation details ==

See Proposed fix: also add the '-W' option to `sphinx-build` to turn warnings into errors.

== Tests ==

bin/test -cvvt lp.scripts.tests.test_sphinxdocs.TestSphinxDocumentation.test_docs_build_without_error

NO QA

-- 
https://code.launchpad.net/~frankban/launchpad/bug-1012314-sphinx-build/+merge/110093
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~frankban/launchpad/bug-1012314-sphinx-build into lp:launchpad.
=== modified file 'lib/lp/scripts/tests/test_sphinxdocs.py'
--- lib/lp/scripts/tests/test_sphinxdocs.py	2011-12-29 05:29:36 +0000
+++ lib/lp/scripts/tests/test_sphinxdocs.py	2012-06-13 15:48:43 +0000
@@ -8,6 +8,7 @@
 import os
 
 import sphinx
+from testtools.content import text_content
 
 from lp.services.config import config
 from lp.services.utils import run_capturing_output
@@ -17,7 +18,6 @@
 class TestSphinxDocumentation(TestCase):
     """Is our Sphinx documentation building correctly?"""
 
-    # XXX: SteveKowalik 2011-02-24 bug=721166 Keep failing spuriously.
     def test_docs_build_without_error(self):
         # The Sphinx documentation must build without errors or warnings.
         #
@@ -30,7 +30,7 @@
         returncode, stdout, stderr = run_capturing_output(
             sphinx.main,
             ['sphinx-build', '-d', '%s/doctrees' % output_dir,
-             '-aNq', doc_dir, '%s/html' % output_dir])
+             '-aNqW', doc_dir, '%s/html' % output_dir])
+        self.addDetail('stdout', text_content(stdout))
+        self.addDetail('stderr', text_content(stderr))
         self.assertEqual(0, returncode)
-        self.assertEqual('Making output directory...\n', stderr)
-        self.assertEqual('', stdout)


Follow ups