Bug 14512 - Do not build tests if isn't required
Summary: Do not build tests if isn't required
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Simon McVittie
QA Contact: John (J5) Palmieri
URL: http://git.collabora.co.uk/?p=user/sm...
Whiteboard:
Keywords: patch
Depends on:
Blocks: dbus-1.4 dbus-1.5
  Show dependency treegraph
 
Reported: 2008-02-15 04:14 UTC by Luca Barbato
Modified: 2011-04-26 10:46 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
bus/Makefile.am cleanup patch (1.62 KB, patch)
2008-03-02 05:48 UTC, Luca Barbato
Details | Splinter Review
Install dbus-daemon and dbus-daemon-launch-helper in the conventional way (4.67 KB, patch)
2011-02-24 09:05 UTC, Simon McVittie
Details | Splinter Review
Rename dbus_daemondir to dbus_daemon_execdir so it's installed by install-exec (1.10 KB, patch)
2011-03-22 05:10 UTC, Simon McVittie
Details | Splinter Review

Description Luca Barbato 2008-02-15 04:14:39 UTC
From the Makefile.am

## we use noinst_PROGRAMS not check_PROGRAMS so that we build 
## even when not doing "make check"
noinst_PROGRAMS=$(TESTS) dbus-daemon dbus-daemon-launch-helper-test dbus-daemon-launch-helper
Comment 1 Luca Barbato 2008-02-15 04:33:11 UTC
addendum. if dbus-daemon has to be installed _maybe_ would be clean put it in the proper target.
Comment 2 Luca Barbato 2008-03-02 05:48:10 UTC
Created attachment 14763 [details] [review]
bus/Makefile.am cleanup patch

I tried to do the cleanup myself, seems working fine
Comment 3 Simon McVittie 2011-02-24 08:58:59 UTC
(In reply to comment #0)
> ## we use noinst_PROGRAMS not check_PROGRAMS so that we build 
> ## even when not doing "make check"

The comment indicates that that's deliberate (presumably to stop the tests bit-rotting because nobody ever compiles them - that's typically the reason for doing this).

(In reply to comment #1)
> addendum. if dbus-daemon has to be installed _maybe_ would be clean put it in
> the proper target.

Yes, that part of your patch is clearly an improvement. Unfortunately, bus/Makefile.am has been reorganised since then and the patch no longer applies; I'll attach a revised patch that makes similar changes.
Comment 4 Simon McVittie 2011-02-24 09:05:30 UTC
Created attachment 43758 [details] [review]
Install dbus-daemon and dbus-daemon-launch-helper in the conventional way

Also remove some pointless indirection (extra_tests etc.), don't install
the unused directory $(libexecdir)/dbus-1 (we actually install the
launch helper directly into $(libexecdir)), and allow dbus_daemondir to be
set on Windows rather than forcing dbus-daemon to be installed to
$(bindir) there.
Comment 5 Simon McVittie 2011-02-24 09:07:11 UTC
(Note that with this patch, the tests are conditional on DBUS_BUILD_TESTS, which is off for production builds of D-Bus.)
Comment 6 Simon McVittie 2011-03-22 05:10:13 UTC
Created attachment 44710 [details] [review]
Rename dbus_daemondir to dbus_daemon_execdir so it's installed by install-exec

Additional patch (which I'll squash into the previous one for commit) to make install-exec work normally.
Comment 7 Colin Walters 2011-04-26 09:36:28 UTC
Comment on attachment 43758 [details] [review]
Install dbus-daemon and dbus-daemon-launch-helper in the conventional way

>From 9ace46e147d1ce10f1051839fa63ab0abcaf6541 Mon Sep 17 00:00:00 2001
>From: Simon McVittie <simon.mcvittie@collabora.co.uk>
>Date: Thu, 24 Feb 2011 17:02:12 +0000
>Subject: [PATCH] Install dbus-daemon and dbus-daemon-launch-helper in the conventional way

This all looks quite clean and correct to me.
Comment 8 Colin Walters 2011-04-26 09:37:23 UTC
(In reply to comment #6)
> Created an attachment (id=44710) [details]
> Rename dbus_daemondir to dbus_daemon_execdir so it's installed by install-exec
> 
> Additional patch (which I'll squash into the previous one for commit) to make
> install-exec work normally.

Looks fine, but who cares about install-exec?  Is that target used for Debian's multiarch stuff?
Comment 9 Simon McVittie 2011-04-26 10:46:11 UTC
Thanks, merged to dbus-1.4 for 1.4.10, and will soon also arrive in master for 1.5.2.

(In reply to comment #8)
> who cares about install-exec?

I was using it to divert off a secondary (verbose/debug-enabled) build of dbus into /usr/lib/dbus-1.0/debug-build, so you can install dbus-dbg and add /usr/lib/dbus-1.0/debug-build/bin to $PATH if things aren't working and you need more info (in a Maemo environment it's much easier if everything you need is already in some not-installed-by-default package, rather than having to do a special compile). We've had a bug report asking for the same thing in Debian, in fact.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.