From 0bd2817e8163fe4eb620f16a8d8ba0c829b4fde9 Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Wed, 10 Jul 2013 13:31:32 +0800 Subject: [PATCH 2/3] TEST: do not build test only files into libdbus There are two files, dbus-test.[ch], which are only used in tests. So do not build them into libdbus. So there is a API change, dbus_internal_do_not_use_run_tests() was exported to libdbus as empty function if test disabled and now it won't be exported, just as the others declaired in dbus-test.h. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66753 Signed-off-by: Chengwei Yang --- dbus/Makefile.am | 8 ++++---- dbus/dbus-test.c | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dbus/Makefile.am b/dbus/Makefile.am index e118cbb..f888be0 100644 --- a/dbus/Makefile.am +++ b/dbus/Makefile.am @@ -259,9 +259,7 @@ DBUS_UTIL_SOURCES= \ dbus-socket-set-poll.c \ dbus-spawn.h \ dbus-string-util.c \ - dbus-sysdeps-util.c \ - dbus-test.c \ - dbus-test.h + dbus-sysdeps-util.c libdbus_1_la_SOURCES= \ $(DBUS_LIB_SOURCES) \ @@ -316,7 +314,9 @@ noinst_PROGRAMS += dbus-test endif dbus_test_SOURCES= \ - dbus-test-main.c + dbus-test-main.c \ + dbus-test.c \ + dbus-test.h dbus_test_LDADD = libdbus-internal.la diff --git a/dbus/dbus-test.c b/dbus/dbus-test.c index 1539bce..e7c770c 100644 --- a/dbus/dbus-test.c +++ b/dbus/dbus-test.c @@ -88,12 +88,11 @@ run_data_test (const char *test_name, /** * An exported symbol to be run in order to execute - * unit tests. Should not be used by - * any app other than our test app, this symbol - * won't exist in some builds of the library. - * (with --enable-tests=no) + * unit tests. Should not be used by any app other + * than our test app. * * @param test_data_dir the directory with test data (test/data normally) + * @param specific_test the test to be run or NULL to run all test cases */ void dbus_internal_do_not_use_run_tests (const char *test_data_dir, const char *specific_test) -- 1.7.9.5