GNOME Bugzilla – Bug 657066
[gobject-introspection] tests should be built only on "make check"
Last modified: 2015-02-07 17:01:26 UTC
Currently, many of the gobject-introspection tests are built on "make all", even when the user has no desire to run them. And at least one of those tests will make use of an external dependency (cairo) that is not needed for building gobject-introspection. To avoid this, makefiles under tests/ should use automake's check_ targets (check_PROGRAMS, check_LTLIBRARIES, etc.) and avoid putting unnecessary entries in BUILT_SOURCES, so that tests are built only on "make check". The only complication is that several of the tests require building shared libraries, but libtool and automake by default build check_LTLIBRARIES targets as static. Fortunately, there is a standard workaround for this issue: add a dummy -rpath argument to LDFLAGS. See http://lists.gnu.org/archive/html/automake/2005-10/msg00107.html for an explanation.
Created attachment 194352 [details] [review] patch to build tests only on make check The attached patch works well here for gobject-introspection-1.29.16. Tests don't build on "make all", and do build (and pass) on "make check".
Review of attachment 194352 [details] [review]: Looks good, and thanks for the well-written and well-argued commit message. I tweaked it to remove the "Addresses" at the end so it matches https://live.gnome.org/GnomeLove/SubmittingPatches
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]