From 1e82db47431fb19b78f8943c17d63227156e2432 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Mon, 25 Jan 2010 15:57:04 +0100 Subject: [PATCH] Allow to override test tool path for cross compilation setup. --- configure.in | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/configure.in b/configure.in index c52abb31c..124f27053 100644 --- a/configure.in +++ b/configure.in @@ -1403,30 +1403,39 @@ AC_DEFINE_UNQUOTED(DBUS_LIBEXECDIR,"$DBUS_LIBEXECDIR", [Directory for installing #### Tell tests where to find certain stuff in builddir DBUS_PWD=`pwd` +# Useful in a cross-compilation environment, where the tests are run on the host system. +AC_ARG_WITH(dbus-test-dir, AS_HELP_STRING([--with-dbus-test-dir=[dirname]],[path where the tests tools are available]), + DBUS_PWD=$withval) AC_DEFUN([TEST_PATH], [ TEST_$1=${DBUS_PWD}/test/$2 AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1", [Full path to test file test/$2 in builddir]) AC_SUBST(TEST_$1) ]) +AC_DEFUN([TEST_PROG], [ +TEST_$1=${DBUS_PWD}/test/$2 +AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1$EXEEXT", + [Full path to test file test/$2 in builddir]) +AC_SUBST(TEST_$1) +]) TEST_PATH(VALID_SERVICE_DIR, data/valid-service-files) TEST_PATH(INVALID_SERVICE_DIR, data/invalid-service-files) TEST_PATH(VALID_SERVICE_SYSTEM_DIR, data/valid-service-files-system) TEST_PATH(INVALID_SERVICE_SYSTEM_DIR, data/invalid-service-files-system) -TEST_PATH(SERVICE_BINARY, test-service) -TEST_PATH(SHELL_SERVICE_BINARY, test-shell-service) -TEST_PATH(EXIT_BINARY, test-exit) -TEST_PATH(SEGFAULT_BINARY, test-segfault) -TEST_PATH(SLEEP_FOREVER_BINARY, test-sleep-forever) -TEST_PATH(PRIVSERVER_BINARY, name-test/test-privserver) - -AC_DEFINE_UNQUOTED(TEST_BUS_BINARY, "$DBUS_PWD/bus/dbus-daemon", +TEST_PROG(SERVICE_BINARY, test-service) +TEST_PROG(SHELL_SERVICE_BINARY, test-shell-service) +TEST_PROG(EXIT_BINARY, test-exit) +TEST_PROG(SEGFAULT_BINARY, test-segfault) +TEST_PROG(SLEEP_FOREVER_BINARY, test-sleep-forever) +TEST_PROG(PRIVSERVER_BINARY, name-test/test-privserver) + +AC_DEFINE_UNQUOTED(TEST_BUS_BINARY, "$DBUS_PWD/bus/dbus-daemon$EXEEXT", [Full path to the daemon in the builddir]) AC_SUBST(TEST_BUS_BINARY) ## Export the non-setuid external helper -TEST_LAUNCH_HELPER_BINARY="$DBUS_PWD/bus/dbus-daemon-launch-helper-test" +TEST_LAUNCH_HELPER_BINARY="$DBUS_PWD/bus/dbus-daemon-launch-helper-test$EXEEXT" AC_SUBST(TEST_LAUNCH_HELPER_BINARY) AC_DEFINE_UNQUOTED(DBUS_TEST_LAUNCH_HELPER_BINARY, "$TEST_LAUNCH_HELPER_BINARY", [Full path to the launch helper test program in the builddir]) -- 2.47.3