After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 786174 - Several test failures on Arch Linux
Several test failures on Arch Linux
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
1.26
Other Linux
: Normal normal
: 1.27
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-11 19:17 UTC by Jan Alexander Steffens (heftig)
Modified: 2017-10-11 16:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests/gtk-doc.make: Generate main sgml file by waiting on mkdb (1.13 KB, patch)
2017-08-11 19:23 UTC, Jan Alexander Steffens (heftig)
committed Details | Review
tests/common.py: Make compatible with Python 3 (1.76 KB, patch)
2017-08-11 19:23 UTC, Jan Alexander Steffens (heftig)
committed Details | Review
tests: Label parts with decimals, not roman numerals (2.59 KB, patch)
2017-08-11 19:23 UTC, Jan Alexander Steffens (heftig)
committed Details | Review
tests/common.py: Make compatible with Python 2 (1.81 KB, patch)
2017-08-12 14:04 UTC, Jan Alexander Steffens (heftig)
committed Details | Review

Description Jan Alexander Steffens (heftig) 2017-08-11 19:17:12 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):
  • File "/usr/lib/python3.6/site-packages/mock/mock.py", line 1297 in patched
    arg = patching.__enter__()
  • File "/usr/lib/python3.6/site-packages/mock/mock.py", line 1353 in __enter__
    self.target = self.getter()
  • File "/usr/lib/python3.6/site-packages/mock/mock.py", line 1523 in <lambda>
    getter = lambda: _importer(target)
  • File "/usr/lib/python3.6/site-packages/mock/mock.py", line 1206 in _importer
    thing = __import__(import_path)
ModuleNotFoundError: No module named '__builtin__'


------


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.
Comment 1 Jan Alexander Steffens (heftig) 2017-08-11 19:23:23 UTC
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.
Comment 2 Jan Alexander Steffens (heftig) 2017-08-11 19:23:28 UTC
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.
Comment 3 Jan Alexander Steffens (heftig) 2017-08-11 19:23:34 UTC
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 4 Stefan Sauer (gstreamer, gtkdoc dev) 2017-08-12 10:23:51 UTC
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 5 Stefan Sauer (gstreamer, gtkdoc dev) 2017-08-12 10:30:15 UTC
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.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2017-08-12 10:32:14 UTC
Thanks for the patches.
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2017-08-12 10:37:26 UTC
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):
  • File "/usr/local/lib/python2.7/dist-packages/mock.py", line 1193 in patched
    arg = patching.__enter__()
  • File "/usr/local/lib/python2.7/dist-packages/mock.py", line 1252 in __enter__
    self.target = self.getter()
  • File "/usr/local/lib/python2.7/dist-packages/mock.py", line 1414 in <lambda>
    getter = lambda: _importer(target)
  • File "/usr/local/lib/python2.7/dist-packages/mock.py", line 1098 in _importer
    thing = __import__(import_path)
ImportError: No module named builtins

Comment 8 Jan Alexander Steffens (heftig) 2017-08-12 13:30:48 UTC
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.
Comment 9 Stefan Sauer (gstreamer, gtkdoc dev) 2017-08-12 13:50:45 UTC
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.
Comment 10 Jan Alexander Steffens (heftig) 2017-08-12 14:04:58 UTC
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 11 Stefan Sauer (gstreamer, gtkdoc dev) 2017-08-12 16:14:22 UTC
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