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 704431 - tests can't find sample files when srcdir != builddir
tests can't find sample files when srcdir != builddir
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.35.x
Other Linux
: Normal normal
: ---
Assigned To: Matthias Clasen
pango-maint
Depends on:
Blocks: 414139
 
 
Reported: 2013-07-18 00:32 UTC by darkxst
Modified: 2015-09-28 13:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Include glib.mk so tests work when srcdir != builddir (14.29 KB, patch)
2013-07-19 08:55 UTC, darkxst
none Details | Review

Description darkxst 2013-07-18 00:32:50 UTC
In latest release ubuntu build fails with failed boundaries test, since it can't find the sample utf8 file.

I suppose this is a regression from e17b595e3bacfb7333bab6fcd1c62d05e7228936 

testboundaries.log:
/text/boundaries: sample file: /tmp/buildd/pango1.0-1.35.0/debian/build/shared/tests/boundaries.utf8
line 0 offset 0 char is 000000: Couldn't open sample text file
 (line is '(null)')

prior to the above commit, test data was being loaded from
srcdir = /tmp/buildd/pango1.0-1.35.0/./tests
Comment 1 darkxst 2013-07-18 03:39:13 UTC
It appears that for G_TEST_DIST to work correctly it is needed to include glib.mk, however I tried to patch the build system similar to what was recently done in gdk-pixbuf, but unfortunately its still not working.
Comment 2 Behdad Esfahbod 2013-07-18 14:25:49 UTC
Matthias?
Comment 3 darkxst 2013-07-19 08:55:04 UTC
Created attachment 249589 [details] [review]
Include glib.mk so tests work when srcdir != builddir
Comment 4 darkxst 2013-07-19 08:55:40 UTC
I attached the patch I made, but right now its not actually working.
Comment 5 Andreas Henriksson 2013-10-23 10:40:32 UTC
Downstream bug report with workaround (set G_TEST_SRCDIR) included:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727174
Comment 6 Matthias Clasen 2014-09-01 15:52:36 UTC
for G_TEST_DIST to work, the documentation states that G_TEST_SRCDIR and G_TEST_BUILDDIR env vars need to be set - which we do in tests/Makefile.am:

TESTS_ENVIRONMENT =                    \
   srcdir=$(srcdir)                    \
   G_TEST_SRCDIR=$(abs_srcdir)         \
   G_TEST_BUILDDIR=$(abs_builddir)     \
   PANGO_RC_FILE=./pangorc

So, the claim in the upstream bug that 'nothing in the build system sets this' is wrong. Whatever is going wrong here needs some more debugging, I'm afraid.
Comment 7 Andreas Henriksson 2015-09-28 13:21:29 UTC
https://git.gnome.org/browse/pango/commit/?id=07de8494412e6d735c5fa04aa8bdf1632582d098

(included in release since 1.36.3)