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 722249 - [PATCH] Allow disabling libuhttpmock dependency with --disable-tests
[PATCH] Allow disabling libuhttpmock dependency with --disable-tests
Status: RESOLVED WONTFIX
Product: libgdata
Classification: Platform
Component: General
git master
Other Linux
: Normal normal
: 0.16
Assigned To: libgdata-maint
libgdata-maint
Depends on:
Blocks:
 
 
Reported: 2014-01-15 09:55 UTC by Priit Laes (IRC: plaes)
Modified: 2014-08-24 14:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
allow-disabling-libuhttpmock.patch (1.29 KB, patch)
2014-01-15 09:55 UTC, Priit Laes (IRC: plaes)
needs-work Details | Review

Description Priit Laes (IRC: plaes) 2014-01-15 09:55:45 UTC
Created attachment 266345 [details] [review]
allow-disabling-libuhttpmock.patch

Extra uhttpmock dependency is unneeded for most people who use source based distros. Therefore I suggest adding a --disable-tests to allow building without the need for uhttpmock library. By default its still needed.
Comment 1 Philip Withnall 2014-01-15 23:06:15 UTC
Review of attachment 266345 [details] [review]:

Have you checked this still passes `make check` with --enable-tests and --disable-tests?

::: Makefile.am
@@ +3,3 @@
+if ENABLE_TESTS
+	SUBDIRS += gdata/tests
+endif

If making SUBDIRS conditional, you need to add DIST_SUBDIRS to ensure the ‘tests’ directory makes it into dist tarballs.
Comment 2 Priit Laes (IRC: plaes) 2014-01-16 07:43:10 UTC
It "passes" tests with --disable-tests. And it *should* work with --enable-tests too, because this is the old behaviour anyway.

Do you know if there's a way to make's `make check` to print out "Tests disabled. Please run configure with --enable-tests to run tests" message?
Comment 3 Philip Withnall 2014-01-16 23:04:09 UTC
(In reply to comment #2)
> It "passes" tests with --disable-tests. And it *should* work with
> --enable-tests too, because this is the old behaviour anyway.

I’d appreciate it if you double-check please (and also try `make distcheck` just to be sure), since these things have a habit of breaking.

> Do you know if there's a way to make's `make check` to print out "Tests
> disabled. Please run configure with --enable-tests to run tests" message?

Hmm. Try adding the following to Makefile.am:

check-local
if !ENABLE_TESTS
    @echo "*** WARNING ***: Functional tests disabled. Re-configure with --enable-tests to run them."
endif
Comment 4 Philip Withnall 2014-08-24 14:17:46 UTC
I'm not interested in spending any of my own time faffing around with the build system to implement this. If someone wants to provide a tested patch for it (noting that the existing patch also needs to add DISTCHECK_CONFIGURE_FLAGS = --enable-tests), I'll be happy to merge it. Please re-open the bug if so.