2007-06-18 19:32:51 +00:00
|
|
|
## the "name-test" subdir in fact contains a bunch of tests now that need a temporary bus
|
|
|
|
|
## to be running to do stuff with. The directory should be renamed.
|
2008-05-30 16:53:35 -04:00
|
|
|
## We want to build the current directory first to pick up the testutils lib
|
|
|
|
|
SUBDIRS= . name-test
|
2006-07-14 16:20:12 +00:00
|
|
|
DIST_SUBDIRS=name-test
|
2003-09-04 00:21:36 +00:00
|
|
|
|
2002-12-15 14:53:29 +00:00
|
|
|
INCLUDES=-I$(top_srcdir) $(DBUS_TEST_CFLAGS)
|
2002-11-25 05:13:09 +00:00
|
|
|
|
2008-05-30 16:53:35 -04:00
|
|
|
libdbus_testutils_la_SOURCES = test-utils.h test-utils.c
|
|
|
|
|
|
|
|
|
|
noinst_LTLIBRARIES = libdbus-testutils.la
|
2003-09-04 00:21:36 +00:00
|
|
|
|
2003-01-15 18:30:12 +00:00
|
|
|
if DBUS_BUILD_TESTS
|
2005-01-15 Havoc Pennington <hp@redhat.com>
* Land the new message args API and type system.
This patch is huge, but the public API change is not
really large. The set of D-BUS types has changed somewhat,
and the arg "getters" are more geared toward language bindings;
they don't make a copy, etc.
There are also some known issues. See these emails for details
on this huge patch:
http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
* dbus/dbus-marshal-*: all the new stuff
* dbus/dbus-message.c: basically rewritten
* dbus/dbus-memory.c (check_guards): with "guards" enabled, init
freed blocks to be all non-nul bytes so using freed memory is less
likely to work right
* dbus/dbus-internals.c (_dbus_test_oom_handling): add
DBUS_FAIL_MALLOC=N environment variable, so you can do
DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
thorough.
* qt/message.cpp: port to the new message args API
(operator<<): use str.utf8() rather than str.unicode()
(pretty sure this is right from the Qt docs?)
* glib/dbus-gvalue.c: port to the new message args API
* bus/dispatch.c, bus/driver.c: port to the new message args API
* dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
"locked" flag to TRUE and align_offset to 0; I guess we never
looked at these anyhow, but seems cleaner.
* dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
move allocation padding macro to this header; use it to implement
(_DBUS_STRING_STATIC): ability to declare a static string.
* dbus/dbus-message.c (_dbus_message_has_type_interface_member):
change to return TRUE if the interface is not set.
* dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
to dbus-marshal-validate.[hc]
* dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
dbus-internals.c
* dbus/Makefile.am: cut over from dbus-marshal.[hc]
to dbus-marshal-*.[hc]
* dbus/dbus-object-tree.c (_dbus_decompose_path): move this
function here from dbus-marshal.c
2005-01-15 07:15:38 +00:00
|
|
|
## break-loader removed for now
|
2007-06-18 19:32:51 +00:00
|
|
|
## most of these binaries are used in tests but are not themselves tests
|
2005-09-12 08:19:33 +00:00
|
|
|
TEST_BINARIES=test-service test-names test-shell-service shell-test spawn-test test-segfault test-exit test-sleep-forever
|
2005-07-14 20:44:15 +00:00
|
|
|
|
2007-06-18 19:32:51 +00:00
|
|
|
## these are the things to run in make check (i.e. they are actual tests)
|
|
|
|
|
## (binaries in here must also be in TEST_BINARIES)
|
2005-07-14 20:44:15 +00:00
|
|
|
TESTS=shell-test
|
2003-01-15 18:30:12 +00:00
|
|
|
else
|
2003-01-18 14:41:37 +00:00
|
|
|
TEST_BINARIES=
|
2005-07-14 20:44:15 +00:00
|
|
|
TESTS=
|
2003-01-15 18:30:12 +00:00
|
|
|
endif
|
|
|
|
|
|
2011-02-02 16:51:30 +00:00
|
|
|
noinst_PROGRAMS= $(TEST_BINARIES)
|
2002-11-25 05:13:09 +00:00
|
|
|
|
2003-04-03 05:22:49 +00:00
|
|
|
test_service_SOURCES= \
|
2008-05-30 16:53:35 -04:00
|
|
|
test-service.c
|
2003-04-03 05:22:49 +00:00
|
|
|
|
2005-09-12 08:19:33 +00:00
|
|
|
test_names_SOURCES= \
|
2008-05-30 16:53:35 -04:00
|
|
|
test-names.c
|
2005-09-12 08:19:33 +00:00
|
|
|
|
2005-01-15 Havoc Pennington <hp@redhat.com>
* Land the new message args API and type system.
This patch is huge, but the public API change is not
really large. The set of D-BUS types has changed somewhat,
and the arg "getters" are more geared toward language bindings;
they don't make a copy, etc.
There are also some known issues. See these emails for details
on this huge patch:
http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
* dbus/dbus-marshal-*: all the new stuff
* dbus/dbus-message.c: basically rewritten
* dbus/dbus-memory.c (check_guards): with "guards" enabled, init
freed blocks to be all non-nul bytes so using freed memory is less
likely to work right
* dbus/dbus-internals.c (_dbus_test_oom_handling): add
DBUS_FAIL_MALLOC=N environment variable, so you can do
DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
thorough.
* qt/message.cpp: port to the new message args API
(operator<<): use str.utf8() rather than str.unicode()
(pretty sure this is right from the Qt docs?)
* glib/dbus-gvalue.c: port to the new message args API
* bus/dispatch.c, bus/driver.c: port to the new message args API
* dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
"locked" flag to TRUE and align_offset to 0; I guess we never
looked at these anyhow, but seems cleaner.
* dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
move allocation padding macro to this header; use it to implement
(_DBUS_STRING_STATIC): ability to declare a static string.
* dbus/dbus-message.c (_dbus_message_has_type_interface_member):
change to return TRUE if the interface is not set.
* dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
to dbus-marshal-validate.[hc]
* dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
dbus-internals.c
* dbus/Makefile.am: cut over from dbus-marshal.[hc]
to dbus-marshal-*.[hc]
* dbus/dbus-object-tree.c (_dbus_decompose_path): move this
function here from dbus-marshal.c
2005-01-15 07:15:38 +00:00
|
|
|
##break_loader_SOURCES= \
|
|
|
|
|
## break-loader.c
|
2003-02-05 23:56:39 +00:00
|
|
|
|
2005-07-14 20:44:15 +00:00
|
|
|
test_shell_service_SOURCES = \
|
2008-05-30 16:53:35 -04:00
|
|
|
test-shell-service.c
|
2005-07-14 20:44:15 +00:00
|
|
|
|
|
|
|
|
shell_test_SOURCES= \
|
|
|
|
|
shell-test.c
|
|
|
|
|
|
2003-02-15 17:18:13 +00:00
|
|
|
spawn_test_SOURCES= \
|
|
|
|
|
spawn-test.c
|
|
|
|
|
|
2003-04-05 00:37:17 +00:00
|
|
|
test_exit_SOURCES = \
|
|
|
|
|
test-exit.c
|
|
|
|
|
|
|
|
|
|
test_segfault_SOURCES = \
|
|
|
|
|
test-segfault.c
|
|
|
|
|
|
|
|
|
|
test_sleep_forever_SOURCES = \
|
|
|
|
|
test-sleep-forever.c
|
|
|
|
|
|
2011-02-22 13:04:18 +00:00
|
|
|
# This assumes that most tests will be linked to libdbus-internal;
|
|
|
|
|
# tests linked to only the public libdbus have their own CPPFLAGS.
|
2010-03-23 02:09:26 +01:00
|
|
|
AM_CPPFLAGS=-DDBUS_STATIC_BUILD
|
2010-03-23 09:21:48 +01:00
|
|
|
TEST_LIBS=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS)
|
2002-11-25 05:13:09 +00:00
|
|
|
|
2009-04-21 12:33:50 +02:00
|
|
|
test_service_LDADD=libdbus-testutils.la $(TEST_LIBS)
|
2006-10-01 15:36:19 +00:00
|
|
|
test_service_LDFLAGS=@R_DYNAMIC_LDFLAG@
|
2009-04-21 12:33:50 +02:00
|
|
|
test_names_LDADD=libdbus-testutils.la $(TEST_LIBS)
|
2006-10-01 15:36:19 +00:00
|
|
|
test_names_LDFLAGS=@R_DYNAMIC_LDFLAG@
|
2005-01-15 Havoc Pennington <hp@redhat.com>
* Land the new message args API and type system.
This patch is huge, but the public API change is not
really large. The set of D-BUS types has changed somewhat,
and the arg "getters" are more geared toward language bindings;
they don't make a copy, etc.
There are also some known issues. See these emails for details
on this huge patch:
http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
* dbus/dbus-marshal-*: all the new stuff
* dbus/dbus-message.c: basically rewritten
* dbus/dbus-memory.c (check_guards): with "guards" enabled, init
freed blocks to be all non-nul bytes so using freed memory is less
likely to work right
* dbus/dbus-internals.c (_dbus_test_oom_handling): add
DBUS_FAIL_MALLOC=N environment variable, so you can do
DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
thorough.
* qt/message.cpp: port to the new message args API
(operator<<): use str.utf8() rather than str.unicode()
(pretty sure this is right from the Qt docs?)
* glib/dbus-gvalue.c: port to the new message args API
* bus/dispatch.c, bus/driver.c: port to the new message args API
* dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
"locked" flag to TRUE and align_offset to 0; I guess we never
looked at these anyhow, but seems cleaner.
* dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
move allocation padding macro to this header; use it to implement
(_DBUS_STRING_STATIC): ability to declare a static string.
* dbus/dbus-message.c (_dbus_message_has_type_interface_member):
change to return TRUE if the interface is not set.
* dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
to dbus-marshal-validate.[hc]
* dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
dbus-internals.c
* dbus/Makefile.am: cut over from dbus-marshal.[hc]
to dbus-marshal-*.[hc]
* dbus/dbus-object-tree.c (_dbus_decompose_path): move this
function here from dbus-marshal.c
2005-01-15 07:15:38 +00:00
|
|
|
## break_loader_LDADD= $(TEST_LIBS)
|
2006-10-01 15:36:19 +00:00
|
|
|
## break_loader_LDFLAGS=@R_DYNAMIC_LDFLAG@
|
2009-04-21 12:33:50 +02:00
|
|
|
test_shell_service_LDADD=libdbus-testutils.la $(TEST_LIBS)
|
2006-10-01 15:36:19 +00:00
|
|
|
test_shell_service_LDFLAGS=@R_DYNAMIC_LDFLAG@
|
2009-04-21 12:33:50 +02:00
|
|
|
shell_test_LDADD=libdbus-testutils.la $(TEST_LIBS)
|
2006-10-01 15:36:19 +00:00
|
|
|
shell_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
|
2003-02-15 17:18:13 +00:00
|
|
|
spawn_test_LDADD=$(TEST_LIBS)
|
2006-10-01 15:36:19 +00:00
|
|
|
spawn_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
|
2002-11-25 05:13:09 +00:00
|
|
|
|
2011-06-08 17:39:41 +01:00
|
|
|
EXTRA_DIST = dbus-test-runner
|
2003-04-03 00:01:15 +00:00
|
|
|
|
2011-06-08 17:39:41 +01:00
|
|
|
testexecdir = $(libdir)/dbus-1.0/test
|
|
|
|
|
|
|
|
|
|
testexec_PROGRAMS =
|
|
|
|
|
|
|
|
|
|
installable_tests = \
|
2011-04-15 13:32:48 +01:00
|
|
|
test-corrupt \
|
2011-06-08 18:15:05 +01:00
|
|
|
test-dbus-daemon \
|
2011-02-22 16:32:14 +00:00
|
|
|
test-loopback \
|
2011-06-09 18:47:04 +01:00
|
|
|
test-marshal \
|
2011-06-08 17:39:41 +01:00
|
|
|
test-relay \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
2011-03-11 13:11:30 +00:00
|
|
|
installcheck_tests =
|
|
|
|
|
installcheck_environment = \
|
|
|
|
|
DBUS_TEST_DAEMON=$(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT) \
|
2011-06-08 18:15:05 +01:00
|
|
|
DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir)
|
2011-03-11 13:11:30 +00:00
|
|
|
|
2011-03-11 12:45:08 +00:00
|
|
|
TESTS_ENVIRONMENT = \
|
|
|
|
|
DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \
|
2011-03-11 13:11:30 +00:00
|
|
|
DBUS_TEST_DATA=@abs_top_builddir@/test/data
|
2011-03-11 12:45:08 +00:00
|
|
|
|
2011-04-15 13:32:48 +01:00
|
|
|
test_corrupt_SOURCES = corrupt.c
|
|
|
|
|
test_corrupt_CPPFLAGS = $(GLIB_CFLAGS) $(DBUS_GLIB_CFLAGS)
|
|
|
|
|
test_corrupt_LDFLAGS = @R_DYNAMIC_LDFLAG@
|
|
|
|
|
test_corrupt_LDADD = $(top_builddir)/dbus/libdbus-1.la \
|
|
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(DBUS_GLIB_LIBS)
|
|
|
|
|
|
2011-02-22 13:04:18 +00:00
|
|
|
test_loopback_SOURCES = loopback.c
|
|
|
|
|
test_loopback_CPPFLAGS = $(GLIB_CFLAGS) $(DBUS_GLIB_CFLAGS)
|
|
|
|
|
test_loopback_LDFLAGS = @R_DYNAMIC_LDFLAG@
|
|
|
|
|
test_loopback_LDADD = $(top_builddir)/dbus/libdbus-1.la \
|
|
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(DBUS_GLIB_LIBS)
|
|
|
|
|
|
2011-02-22 16:32:14 +00:00
|
|
|
test_relay_SOURCES = relay.c
|
|
|
|
|
test_relay_CPPFLAGS = $(GLIB_CFLAGS) $(DBUS_GLIB_CFLAGS)
|
|
|
|
|
test_relay_LDFLAGS = @R_DYNAMIC_LDFLAG@
|
|
|
|
|
test_relay_LDADD = $(top_builddir)/dbus/libdbus-1.la \
|
|
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(DBUS_GLIB_LIBS)
|
|
|
|
|
|
2011-03-11 13:13:17 +00:00
|
|
|
test_dbus_daemon_SOURCES = dbus-daemon.c
|
|
|
|
|
test_dbus_daemon_CPPFLAGS = $(GLIB_CFLAGS) $(DBUS_GLIB_CFLAGS)
|
|
|
|
|
test_dbus_daemon_LDFLAGS = @R_DYNAMIC_LDFLAG@
|
|
|
|
|
test_dbus_daemon_LDADD = $(top_builddir)/dbus/libdbus-1.la \
|
2011-06-09 18:47:04 +01:00
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(DBUS_GLIB_LIBS)
|
|
|
|
|
|
|
|
|
|
test_marshal_SOURCES = marshal.c
|
|
|
|
|
test_marshal_CPPFLAGS = $(GLIB_CFLAGS) $(DBUS_GLIB_CFLAGS)
|
|
|
|
|
test_marshal_LDFLAGS = @R_DYNAMIC_LDFLAG@
|
|
|
|
|
test_marshal_LDADD = $(top_builddir)/dbus/libdbus-1.la \
|
2011-03-11 13:13:17 +00:00
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(DBUS_GLIB_LIBS)
|
|
|
|
|
|
2011-02-22 13:04:18 +00:00
|
|
|
if DBUS_ENABLE_MODULAR_TESTS
|
2011-06-08 17:39:41 +01:00
|
|
|
TESTS += $(installable_tests)
|
|
|
|
|
installcheck_tests += $(installable_tests)
|
|
|
|
|
|
|
|
|
|
if DBUS_ENABLE_INSTALLED_TESTS
|
|
|
|
|
testexec_PROGRAMS += $(installable_tests)
|
|
|
|
|
else !DBUS_ENABLE_INSTALLED_TESTS
|
2011-06-10 21:52:39 +01:00
|
|
|
noinst_PROGRAMS += $(installable_tests)
|
2011-06-08 17:39:41 +01:00
|
|
|
endif !DBUS_ENABLE_INSTALLED_TESTS
|
|
|
|
|
|
2011-02-22 13:04:18 +00:00
|
|
|
endif DBUS_ENABLE_MODULAR_TESTS
|
|
|
|
|
|
2011-06-08 18:47:14 +01:00
|
|
|
# If we're installing the tests into a DESTDIR we can't run them
|
|
|
|
|
# again using the installed copy, because we don't know how to
|
|
|
|
|
# do a portable equivalent of setting LD_LIBRARY_PATH.
|
2011-03-11 13:11:30 +00:00
|
|
|
installcheck-local:
|
|
|
|
|
$(MAKE) check-TESTS TESTS='$$(installcheck_tests)' \
|
|
|
|
|
TESTS_ENVIRONMENT='$$(installcheck_environment)'
|
2011-06-08 17:39:41 +01:00
|
|
|
if DBUS_ENABLE_INSTALLED_TESTS
|
2011-06-08 18:47:14 +01:00
|
|
|
test -n "$(DESTDIR)" || \
|
2011-06-08 17:39:41 +01:00
|
|
|
$(installcheck_environment) \
|
|
|
|
|
$(srcdir)/dbus-test-runner \
|
|
|
|
|
$(testexecdir) \
|
|
|
|
|
$(testexec_PROGRAMS)
|
|
|
|
|
endif DBUS_ENABLE_INSTALLED_TESTS
|
2011-03-11 13:11:30 +00:00
|
|
|
|
2003-04-03 00:01:15 +00:00
|
|
|
## keep these in creation order, i.e. uppermost dirs first
|
|
|
|
|
TESTDIRS= \
|
|
|
|
|
data \
|
|
|
|
|
data/valid-messages \
|
|
|
|
|
data/invalid-messages \
|
|
|
|
|
data/incomplete-messages \
|
|
|
|
|
data/auth \
|
|
|
|
|
data/sha-1 \
|
|
|
|
|
data/valid-config-files \
|
2007-07-24 12:48:45 +00:00
|
|
|
data/valid-config-files-system \
|
2003-04-03 21:56:22 +00:00
|
|
|
data/valid-config-files/basic.d \
|
2007-06-09 21:53:20 +00:00
|
|
|
data/valid-config-files/session.d \
|
2003-04-28 19:29:42 +00:00
|
|
|
data/valid-config-files/system.d \
|
2004-04-13 01:37:57 +00:00
|
|
|
data/valid-service-files \
|
2007-07-24 12:48:45 +00:00
|
|
|
data/valid-service-files-system \
|
|
|
|
|
data/invalid-service-files-system \
|
2004-04-13 01:37:57 +00:00
|
|
|
data/invalid-config-files \
|
2007-07-24 12:48:45 +00:00
|
|
|
data/invalid-config-files-system \
|
2004-04-13 01:37:57 +00:00
|
|
|
data/equiv-config-files \
|
|
|
|
|
data/equiv-config-files/basic \
|
|
|
|
|
data/equiv-config-files/basic/basic.d \
|
|
|
|
|
data/equiv-config-files/entities \
|
|
|
|
|
data/equiv-config-files/entities/basic.d
|
|
|
|
|
|
2003-04-03 00:01:15 +00:00
|
|
|
|
2010-08-09 08:32:04 +02:00
|
|
|
FIND_TESTS=find . -type f -a \( -name "*.message" -o -name "*.message-raw" -o -name "*.auth-script" -o -name "*.sha1" -o -name "*.txt" -o -name "*.conf" -o -name "*.service" \)
|
2003-03-31 08:19:50 +00:00
|
|
|
|
2003-02-16 23:35:51 +00:00
|
|
|
dist-hook:
|
2003-04-03 00:01:15 +00:00
|
|
|
for D in $(TESTDIRS); do \
|
|
|
|
|
test -d $(distdir)/$$D || mkdir $(distdir)/$$D || exit 1 ; \
|
|
|
|
|
done ; \
|
2007-03-04 18:53:29 +00:00
|
|
|
FILES=`(cd $(srcdir) && $(FIND_TESTS) -o -name "*.in" -a -not -name Makefile.in | grep -Ev "(.svn|CVS)" )` ; \
|
2003-04-03 00:01:15 +00:00
|
|
|
for F in $$FILES; do \
|
2011-02-01 18:04:21 +00:00
|
|
|
B=`basename $$F`; \
|
|
|
|
|
if test -e $$F.in; then \
|
|
|
|
|
echo "-- Skipping file $$F (.in version exists)"; \
|
|
|
|
|
elif test "x$$B" = xrun-with-tmp-session-bus.conf; then \
|
|
|
|
|
echo "-- Skipping file $$F (generated)"; \
|
|
|
|
|
elif test -e "$(top_srcdir)/bus/$$B"; then \
|
|
|
|
|
echo "-- Skipping file $$F (from /bus/)"; \
|
|
|
|
|
else \
|
|
|
|
|
echo '-- Disting file '$$F ; \
|
|
|
|
|
cp -f $(srcdir)/$$F $(distdir)/$$F || exit 1; \
|
|
|
|
|
fi; \
|
2003-01-28 03:53:29 +00:00
|
|
|
done
|
2003-03-31 08:19:50 +00:00
|
|
|
|
2003-04-03 00:01:15 +00:00
|
|
|
## copy tests to builddir so that generated tests and static tests
|
|
|
|
|
## are all in one place.
|
|
|
|
|
all-local:
|
2010-09-08 19:42:19 +01:00
|
|
|
$(AM_V_at)for D in $(TESTDIRS); do \
|
2003-04-03 00:01:15 +00:00
|
|
|
test -d $(top_builddir)/test/$$D || mkdir $(top_builddir)/test/$$D || exit 1 ; \
|
|
|
|
|
done ; \
|
2003-09-17 03:52:07 +00:00
|
|
|
if ! (test $(srcdir) = . || test $(srcdir) -ef .) ; then \
|
2007-03-04 18:53:29 +00:00
|
|
|
FILES=`(cd $(srcdir) && $(FIND_TESTS) | grep -Ev "(.svn|CVS)" )` ; \
|
2003-04-03 00:01:15 +00:00
|
|
|
for F in $$FILES; do \
|
|
|
|
|
SRC=$(srcdir)/$$F ; \
|
|
|
|
|
DEST=$(top_builddir)/test/$$F ; \
|
|
|
|
|
echo '-- Copying test file '$$F ; \
|
|
|
|
|
cp $$SRC $$DEST || exit 1 ; \
|
|
|
|
|
chmod u+w $$DEST || exit 1 ; \
|
|
|
|
|
done ; \
|
|
|
|
|
else \
|
|
|
|
|
echo '-- No need to copy test data as srcdir = builddir' ; \
|
|
|
|
|
fi ; \
|
|
|
|
|
echo '-- Copying' $(top_builddir)/bus/*.conf 'to test directory' ; \
|
|
|
|
|
cp $(top_builddir)/bus/*.conf $(top_builddir)/test/data/valid-config-files || exit 1 ; \
|
|
|
|
|
chmod u+w $(top_builddir)/test/data/valid-config-files/*.conf || exit 1
|
2003-03-31 08:19:50 +00:00
|
|
|
|
2003-04-03 00:01:15 +00:00
|
|
|
## this doesn't clean generated test data files when srcdir=builddir
|
|
|
|
|
clean-local:
|
|
|
|
|
if test $(srcdir) != . ; then \
|
2007-03-04 18:53:29 +00:00
|
|
|
FILES=`(cd $(top_builddir)/test && $(FIND_TESTS) | grep -Ev "(.svn|CVS)" )` ; \
|
2003-04-03 00:01:15 +00:00
|
|
|
for F in $$FILES; do \
|
|
|
|
|
DEST=$(top_builddir)/test/$$F ; \
|
|
|
|
|
echo '-- Deleting test file '$$F ; \
|
|
|
|
|
rm $$DEST || exit 1 ; \
|
|
|
|
|
done ; \
|
|
|
|
|
REVERSEDIRS= ; \
|
|
|
|
|
for D in $(TESTDIRS); do \
|
|
|
|
|
REVERSEDIRS="$$D $$REVERSEDIRS" ; \
|
|
|
|
|
done ; \
|
|
|
|
|
for D in $$REVERSEDIRS; do \
|
|
|
|
|
rmdir $(top_builddir)/test/$$D || exit 1 ; \
|
|
|
|
|
done ; \
|
|
|
|
|
fi
|