[PATCH] Do not build test binaries at 'make all' stage
Chengwei Yang
chengwei.yang at intel.com
Thu May 30 06:02:30 PDT 2013
Use check_ instead of noinst_ to avoid build test binaries at 'make all'
stage, and these binaries then built at 'make check' stage.
Since not every one will 'make check', so it will save several seconds
for them.
Signed-off-by: Chengwei Yang <chengwei.yang at intel.com>
---
bus/Makefile.am | 7 ++++---
dbus/Makefile.am | 4 ++--
test/Makefile.am | 6 +++---
test/name-test/Makefile.am | 13 +++++--------
4 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/bus/Makefile.am b/bus/Makefile.am
index 6cbc09a..f338d27 100644
--- a/bus/Makefile.am
+++ b/bus/Makefile.am
@@ -163,6 +163,7 @@ bus_test_launch_helper_CPPFLAGS = \
-DACTIVATION_LAUNCHER_DO_OOM
noinst_PROGRAMS =
+check_PROGRAMS =
dbus_daemon_exec_PROGRAMS = dbus-daemon
if DBUS_UNIX
libexec_PROGRAMS = dbus-daemon-launch-helper
@@ -178,13 +179,13 @@ if DBUS_BUILD_TESTS
## even when not doing "make check"
# run as a test by test/Makefile.am
-noinst_PROGRAMS += bus-test bus-test-system
+check_PROGRAMS += bus-test bus-test-system
if DBUS_UNIX
# run as a test by test/Makefile.am
-noinst_PROGRAMS += bus-test-launch-helper
+check_PROGRAMS += bus-test-launch-helper
# this is used by the tests but is not,itself, a test
-noinst_PROGRAMS += dbus-daemon-launch-helper-test
+check_PROGRAMS += dbus-daemon-launch-helper-test
endif DBUS_UNIX
endif DBUS_BUILD_TESTS
diff --git a/dbus/Makefile.am b/dbus/Makefile.am
index fe9c93f..febbae2 100644
--- a/dbus/Makefile.am
+++ b/dbus/Makefile.am
@@ -296,11 +296,11 @@ libdbus_internal_la_CPPFLAGS = \
$(NULL)
libdbus_internal_la_LIBADD=$(LIBDBUS_LIBS) $(SYSTEMD_LIBS)
-noinst_PROGRAMS =
+check_PROGRAMS =
if DBUS_BUILD_TESTS
# We can't actually run this til we've reached test/
-noinst_PROGRAMS += dbus-test
+check_PROGRAMS += dbus-test
endif
dbus_test_SOURCES= \
diff --git a/test/Makefile.am b/test/Makefile.am
index e944899..2dc8775 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -31,7 +31,7 @@ libdbus_testutils_la_LIBADD = \
$(top_builddir)/dbus/libdbus-internal.la \
$(NULL)
-noinst_LTLIBRARIES = libdbus-testutils.la
+check_LTLIBRARIES = libdbus-testutils.la
if DBUS_BUILD_TESTS
## break-loader removed for now
@@ -66,7 +66,7 @@ TESTS=
endif !DBUS_BUILD_TESTS
-noinst_PROGRAMS= $(TEST_BINARIES)
+check_PROGRAMS= $(TEST_BINARIES)
test_service_CPPFLAGS = $(static_cppflags)
test_service_LDADD = libdbus-testutils.la
@@ -170,7 +170,7 @@ installcheck_tests += $(installable_tests)
if DBUS_ENABLE_INSTALLED_TESTS
testexec_PROGRAMS += $(installable_tests)
else !DBUS_ENABLE_INSTALLED_TESTS
- noinst_PROGRAMS += $(installable_tests)
+ check_PROGRAMS += $(installable_tests)
endif !DBUS_ENABLE_INSTALLED_TESTS
endif DBUS_ENABLE_MODULAR_TESTS
diff --git a/test/name-test/Makefile.am b/test/name-test/Makefile.am
index 6aaf178..9ac61e9 100644
--- a/test/name-test/Makefile.am
+++ b/test/name-test/Makefile.am
@@ -14,17 +14,10 @@ AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
if DBUS_BUILD_TESTS
TESTS_ENVIRONMENT=DBUS_TOP_BUILDDIR=@abs_top_builddir@ DBUS_TOP_SRCDIR=@abs_top_srcdir@ PYTHON=@PYTHON@
TESTS=run-test.sh run-test-systemserver.sh
-else
-TESTS=
-endif
-
-EXTRA_DIST=run-test.sh run-test-systemserver.sh test-wait-for-echo.py test-activation-forking.py
-
-if DBUS_BUILD_TESTS
## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
## build even when not doing "make check"
-noinst_PROGRAMS=test-pending-call-dispatch test-pending-call-timeout test-threads-init test-ids test-shutdown test-privserver test-privserver-client test-autolaunch
+check_PROGRAMS=test-pending-call-dispatch test-pending-call-timeout test-threads-init test-ids test-shutdown test-privserver test-privserver-client test-autolaunch
test_pending_call_dispatch_LDADD=$(top_builddir)/dbus/libdbus-internal.la
test_pending_call_timeout_LDADD=$(top_builddir)/dbus/libdbus-internal.la
@@ -36,4 +29,8 @@ test_privserver_LDADD=../libdbus-testutils.la
test_privserver_client_LDADD=../libdbus-testutils.la
test_autolaunch_LDADD=../libdbus-testutils.la
+else
+TESTS=
endif
+
+EXTRA_DIST=run-test.sh run-test-systemserver.sh test-wait-for-echo.py test-activation-forking.py
--
1.7.9.5
More information about the dbus
mailing list