From 162c3b5f5d6a6692d0526add4fa76d9a074a9b35 Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Fri, 28 Jun 2013 16:06:41 +0800 Subject: [PATCH 1/5] tests to embedded tests: replaced in automake files Signed-off-by: Chengwei Yang --- bus/Makefile.am | 4 ++-- configure.ac | 6 +----- dbus/Makefile.am | 2 +- test/Makefile.am | 6 +++--- test/name-test/Makefile.am | 4 ++-- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/bus/Makefile.am b/bus/Makefile.am index 74c62e7..9715074 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am @@ -168,7 +168,7 @@ endif DBUS_UNIX ## compiled, so we don't put them in TESTS here; we run them in test/ ## instead. -if DBUS_BUILD_TESTS +if DBUS_ENABLE_EMBEDDED_TESTS ## we use noinst_PROGRAMS not check_PROGRAMS so that we build ## even when not doing "make check" @@ -182,7 +182,7 @@ noinst_PROGRAMS += bus-test-launch-helper noinst_PROGRAMS += dbus-daemon-launch-helper-test endif DBUS_UNIX -endif DBUS_BUILD_TESTS +endif DBUS_ENABLE_EMBEDDED_TESTS bus_test_system_SOURCES= \ $(XML_SOURCES) \ diff --git a/configure.ac b/configure.ac index 782dfba..aa0ef25 100644 --- a/configure.ac +++ b/configure.ac @@ -193,16 +193,12 @@ AC_ARG_ENABLE([tests], []) # DBUS_ENABLE_EMBEDDED_TESTS controls unit tests built in to .c files -# and also some stuff in the test/ subdir. DBUS_BUILD_TESTS was an older -# name for this. -AM_CONDITIONAL([DBUS_BUILD_TESTS], [test "x$enable_embedded_tests" = xyes]) +# and also some stuff in the test/ subdir. AM_CONDITIONAL([DBUS_ENABLE_EMBEDDED_TESTS], [test "x$enable_embedded_tests" = xyes]) if test "x$enable_embedded_tests" = xyes; then AC_DEFINE([DBUS_ENABLE_EMBEDDED_TESTS], [1], [Define to build test code into the library and binaries]) - AC_DEFINE([DBUS_BUILD_TESTS], [1], - [Define to build test code into the library and binaries]) fi # DBUS_ENABLE_MODULAR_TESTS controls tests that work based on public API. diff --git a/dbus/Makefile.am b/dbus/Makefile.am index 9628c83..e118cbb 100644 --- a/dbus/Makefile.am +++ b/dbus/Makefile.am @@ -310,7 +310,7 @@ endif noinst_PROGRAMS = -if DBUS_BUILD_TESTS +if DBUS_ENABLE_EMBEDDED_TESTS # We can't actually run this til we've reached test/ noinst_PROGRAMS += dbus-test endif diff --git a/test/Makefile.am b/test/Makefile.am index 6f0e6e1..074017a 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -33,7 +33,7 @@ libdbus_testutils_la_LIBADD = \ noinst_LTLIBRARIES = libdbus-testutils.la -if DBUS_BUILD_TESTS +if DBUS_ENABLE_EMBEDDED_TESTS ## break-loader removed for now ## these binaries are used in tests but are not themselves tests TEST_BINARIES = \ @@ -59,12 +59,12 @@ if DBUS_UNIX TESTS += ../bus/bus-test-launch-helper$(EXEEXT) endif -else !DBUS_BUILD_TESTS +else !DBUS_ENABLE_EMBEDDED_TESTS TEST_BINARIES= TESTS= -endif !DBUS_BUILD_TESTS +endif !DBUS_ENABLE_EMBEDDED_TESTS noinst_PROGRAMS= $(TEST_BINARIES) diff --git a/test/name-test/Makefile.am b/test/name-test/Makefile.am index 6aaf178..424dad3 100644 --- a/test/name-test/Makefile.am +++ b/test/name-test/Makefile.am @@ -11,7 +11,7 @@ AM_LDFLAGS = @R_DYNAMIC_LDFLAG@ ## note that TESTS has special meaning (stuff to use in make check) ## so if adding tests not to be run in make check, don't add them to ## TESTS -if DBUS_BUILD_TESTS +if DBUS_ENABLE_EMBEDDED_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 @@ -20,7 +20,7 @@ endif EXTRA_DIST=run-test.sh run-test-systemserver.sh test-wait-for-echo.py test-activation-forking.py -if DBUS_BUILD_TESTS +if DBUS_ENABLE_EMBEDDED_TESTS ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we ## build even when not doing "make check" -- 1.7.9.5