GNOME Bugzilla – Bug 786174
Several test failures on Arch Linux
Last modified: 2017-10-11 16:13:07 UTC
Attempting to `make check` gtk-doc 1.26 on Arch Linux provokes several test failures. ------ Running the tests in parallel (make -j) causes the `empty` test to fail: make[4]: Entering directory '/build/gtk-doc/src/gtk-doc/tests/empty/docs' make[4]: *** No rule to make target 'tester-docs.xml', needed by 'html-build.stamp'. Stop. ------ With Python 3.6, the common.py test fails: FAIL: common.py =============== ./common.py:60: DeprecationWarning: Please use assertEqual instead. self.assertEquals(common.CreateValidSGMLID('x'), 'x') ....E. ====================================================================== ERROR: test_FilesAreTheSame (__main__.TestUpdateFileIfChanged) ---------------------------------------------------------------------- Traceback (most recent call last):
+ Trace 237796
arg = patching.__enter__()
self.target = self.getter()
getter = lambda: _importer(target)
thing = __import__(import_path)
------ dblatex outputs several warnings that sanity.sh complains about: FAIL: sanity.sh =============== Running suite(s): gtk-doc-sanity /build/gtk-doc/src/gtk-doc/tests/annotations/docs/html/tester.devhelp2 validates /build/gtk-doc/src/gtk-doc/tests/bugs/docs/html/tester.devhelp2 validates /build/gtk-doc/src/gtk-doc/tests/empty/docs/html/tester.devhelp2 validates /build/gtk-doc/src/gtk-doc/tests/fail/docs/html/tester.devhelp2 validates /build/gtk-doc/src/gtk-doc/tests/gobject/docs/html/tester.devhelp2 validates /build/gtk-doc/src/gtk-doc/tests/program/docs/html/tester.devhelp2 validates expected no more than 1 log line in /build/gtk-doc/src/gtk-doc/tests/annotations/docs/gtkdoc-mkpdf.log, but got 3 expected no more than 1 log line in /build/gtk-doc/src/gtk-doc/tests/gobject/docs/gtkdoc-mkpdf.log, but got 4 85 %: Checks 7, Failures: 1 FAIL sanity.sh (exit status: 1) gtkdoc-mkpdf --uninstalled --path=/build/gtk-doc/src/gtk-doc/tests/annotations/docs tester tester-docs.xml Warning: only an integer in @label can be processed: 'II' Warning: only an integer in @label can be processed: 'III' gtkdoc-mkpdf --uninstalled --path=/build/gtk-doc/src/gtk-doc/tests/gobject/docs --imgdir=./images tester tester-docs.xml Warning: only an integer in @label can be processed: 'I' Warning: only an integer in @label can be processed: 'II' Warning: only an integer in @label can be processed: 'III' ------ Patches to follow.
Created attachment 357442 [details] [review] tests/gtk-doc.make: Generate main sgml file by waiting on mkdb The 'empty' test fails on some machines when doing a parallel build, as make cannot find tester-docs.xml. Add a rule to ensure make waits for gtkdoc-mkdb to generate the file.
Created attachment 357443 [details] [review] tests/common.py: Make compatible with Python 3 Attempt to load the modules for Python 3 first. If this fails, attempt to load the modules for Python 2.
Created attachment 357444 [details] [review] tests: Label parts with decimals, not roman numerals dblatex (via gtkdoc-mkpdf) warns that labels must be integers: Warning: only an integer in @label can be processed: 'I' Warning: only an integer in @label can be processed: 'II' Warning: only an integer in @label can be processed: 'III' Make the labels decimal to placate dblatex. I'm not sure this is actually the best solution, though.
Comment on attachment 357442 [details] [review] tests/gtk-doc.make: Generate main sgml file by waiting on mkdb We also need to do this for the gtk-doc.make in the top-level dir we install.
Comment on attachment 357442 [details] [review] tests/gtk-doc.make: Generate main sgml file by waiting on mkdb I submitted a modified version which also applies the same fix to the gtk-doc.make we install.
Thanks for the patches.
Comment on attachment 357443 [details] [review] tests/common.py: Make compatible with Python 3 Meh, I pushed it in good faith, but it does not seem to work: Traceback (most recent call last):
+ Trace 237798
Alright, I'll give it another shot. Maybe the PYTHON=/usr/bin/python2 I gave to configure wasn't sufficient and it still ended up using Py3 here.
meh, the test use #!/usr/bin/env python I need to change this to use $PYTHON and ensure that PYTHON is set via TESTS_ENVIRONMENT I guess.
Created attachment 357472 [details] [review] tests/common.py: Make compatible with Python 2 56213947 doesn't actually work on Python 2, as mock can't find the 'builtins.open' in the current scope. Try another method of naming 'open' with the help of six, which we already depend on.
Comment on attachment 357472 [details] [review] tests/common.py: Make compatible with Python 2 Still causes some problems for me. maybe my py 3.X is too old https://gist.github.com/ensonic/77a6e2e2363fae7dca16f49d2752cab8