Commit 6934bc69 authored by Simon McVittie's avatar Simon McVittie

Simplify generation of bus configuration files

Signed-off-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker's avatarRalf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41222
parent ba033709
...@@ -478,9 +478,7 @@ add_definitions(${DBUS_BUS_CFLAGS}) ...@@ -478,9 +478,7 @@ add_definitions(${DBUS_BUS_CFLAGS})
if (DBUS_BUILD_TESTS) if (DBUS_BUILD_TESTS)
# set variables used for the .in files (substituted by configure_file) in test/data: # set variables used for the .in files (substituted by configure_file) in test/data:
set(TEST_VALID_SERVICE_DIR ${CMAKE_BINARY_DIR}/test/data/valid-service-files) set(DBUS_TEST_DATA ${CMAKE_BINARY_DIR}/test/data)
set(TEST_VALID_SERVICE_SYSTEM_DIR ${CMAKE_BINARY_DIR}/test/data/valid-service-files-system)
set(TEST_INVALID_SERVICE_SYSTEM_DIR ${CMAKE_BINARY_DIR}/test/data/invalid-service-files-system)
set(TEST_SOCKET_DIR ${DBUS_SESSION_SOCKET_DIR} ) set(TEST_SOCKET_DIR ${DBUS_SESSION_SOCKET_DIR} )
set(TEST_LAUNCH_HELPER_BINARY ${EXECUTABLE_OUTPUT_PATH}/dbus-daemon-launch-helper-test) set(TEST_LAUNCH_HELPER_BINARY ${EXECUTABLE_OUTPUT_PATH}/dbus-daemon-launch-helper-test)
set(TEST_PRIVSERVER_BINARY ${EXECUTABLE_OUTPUT_PATH}/test-privserver) set(TEST_PRIVSERVER_BINARY ${EXECUTABLE_OUTPUT_PATH}/test-privserver)
......
...@@ -1519,12 +1519,6 @@ DBUS_PWD=`pwd` ...@@ -1519,12 +1519,6 @@ DBUS_PWD=`pwd`
# Useful in a cross-compilation environment, where the tests are run on the host system. # 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]), AC_ARG_WITH(dbus-test-dir, AS_HELP_STRING([--with-dbus-test-dir=[dirname]],[path where the tests tools are available]),
DBUS_PWD=$withval) 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], [ AC_DEFUN([TEST_PROG], [
TEST_$1=${DBUS_PWD}/test/$2 TEST_$1=${DBUS_PWD}/test/$2
AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1$EXEEXT", AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1$EXEEXT",
...@@ -1532,10 +1526,9 @@ AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1$EXEEXT", ...@@ -1532,10 +1526,9 @@ AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1$EXEEXT",
AC_SUBST(TEST_$1) AC_SUBST(TEST_$1)
]) ])
TEST_PATH(VALID_SERVICE_DIR, data/valid-service-files) DBUS_TEST_DATA="$DBUS_PWD/test/data"
TEST_PATH(INVALID_SERVICE_DIR, data/invalid-service-files) AC_SUBST([DBUS_TEST_DATA])
TEST_PATH(VALID_SERVICE_SYSTEM_DIR, data/valid-service-files-system)
TEST_PATH(INVALID_SERVICE_SYSTEM_DIR, data/invalid-service-files-system)
TEST_PROG(SERVICE_BINARY, test-service) TEST_PROG(SERVICE_BINARY, test-service)
TEST_PROG(SHELL_SERVICE_BINARY, test-shell-service) TEST_PROG(SHELL_SERVICE_BINARY, test-shell-service)
TEST_PROG(EXIT_BINARY, test-exit) TEST_PROG(EXIT_BINARY, test-exit)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<listen>@TEST_LISTEN@</listen> <listen>@TEST_LISTEN@</listen>
<type>system</type> <type>system</type>
<servicehelper>@TEST_LAUNCH_HELPER_BINARY@</servicehelper> <servicehelper>@TEST_LAUNCH_HELPER_BINARY@</servicehelper>
<servicedir>@TEST_INVALID_SERVICE_SYSTEM_DIR@</servicedir> <servicedir>@DBUS_TEST_DATA@/invalid-service-files-system</servicedir>
<policy context="default"> <policy context="default">
<allow send_interface="*"/> <allow send_interface="*"/>
<allow receive_interface="*"/> <allow receive_interface="*"/>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<listen>unix:tmpdir=@TEST_SOCKET_DIR@</listen> <listen>unix:tmpdir=@TEST_SOCKET_DIR@</listen>
<type>system</type> <type>system</type>
<servicehelper>@TEST_LAUNCH_HELPER_BINARY@</servicehelper> <servicehelper>@TEST_LAUNCH_HELPER_BINARY@</servicehelper>
<servicedir>@TEST_INVALID_SERVICE_SYSTEM_DIR@</servicedir> <servicedir>@DBUS_TEST_DATA@/invalid-service-files-system</servicedir>
<policy context="default"> <policy context="default">
<allow send_interface="*"/> <allow send_interface="*"/>
<allow receive_interface="*"/> <allow receive_interface="*"/>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<listen>@TEST_LISTEN@</listen> <listen>@TEST_LISTEN@</listen>
<type>system</type> <type>system</type>
<servicehelper>@TEST_LAUNCH_HELPER_BINARY@</servicehelper> <servicehelper>@TEST_LAUNCH_HELPER_BINARY@</servicehelper>
<servicedir>@TEST_VALID_SERVICE_SYSTEM_DIR@</servicedir> <servicedir>@DBUS_TEST_DATA@/valid-service-files-system</servicedir>
<policy context="default"> <policy context="default">
<allow send_interface="*"/> <allow send_interface="*"/>
<allow receive_interface="*"/> <allow receive_interface="*"/>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<listen>unix:tmpdir=@TEST_SOCKET_DIR@</listen> <listen>unix:tmpdir=@TEST_SOCKET_DIR@</listen>
<type>system</type> <type>system</type>
<servicehelper>@TEST_LAUNCH_HELPER_BINARY@</servicehelper> <servicehelper>@TEST_LAUNCH_HELPER_BINARY@</servicehelper>
<servicedir>@TEST_VALID_SERVICE_SYSTEM_DIR@</servicedir> <servicedir>@DBUS_TEST_DATA@/valid-service-files-system</servicedir>
<policy context="default"> <policy context="default">
<allow send_interface="*"/> <allow send_interface="*"/>
<allow receive_interface="*"/> <allow receive_interface="*"/>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig> <busconfig>
<listen>@TEST_LISTEN@</listen> <listen>@TEST_LISTEN@</listen>
<servicedir>@TEST_VALID_SERVICE_DIR@</servicedir> <servicedir>@DBUS_TEST_DATA@/valid-service-files</servicedir>
<auth>DBUS_COOKIE_SHA1</auth> <auth>DBUS_COOKIE_SHA1</auth>
<policy context="default"> <policy context="default">
<allow send_interface="*"/> <allow send_interface="*"/>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<busconfig> <busconfig>
<listen>debug-pipe:name=test-server</listen> <listen>debug-pipe:name=test-server</listen>
<listen>unix:tmpdir=@TEST_SOCKET_DIR@</listen> <listen>unix:tmpdir=@TEST_SOCKET_DIR@</listen>
<servicedir>@TEST_VALID_SERVICE_DIR@</servicedir> <servicedir>@DBUS_TEST_DATA@/valid-service-files</servicedir>
<auth>DBUS_COOKIE_SHA1</auth> <auth>DBUS_COOKIE_SHA1</auth>
<policy context="default"> <policy context="default">
<allow send_interface="*"/> <allow send_interface="*"/>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig> <busconfig>
<listen>@TEST_LISTEN@</listen> <listen>@TEST_LISTEN@</listen>
<servicedir>@TEST_VALID_SERVICE_DIR@</servicedir> <servicedir>@DBUS_TEST_DATA@/valid-service-files</servicedir>
<policy context="default"> <policy context="default">
<allow send_interface="*"/> <allow send_interface="*"/>
<allow receive_interface="*"/> <allow receive_interface="*"/>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<busconfig> <busconfig>
<listen>debug-pipe:name=test-server</listen> <listen>debug-pipe:name=test-server</listen>
<listen>unix:tmpdir=@TEST_SOCKET_DIR@</listen> <listen>unix:tmpdir=@TEST_SOCKET_DIR@</listen>
<servicedir>@TEST_VALID_SERVICE_DIR@</servicedir> <servicedir>@DBUS_TEST_DATA@/valid-service-files</servicedir>
<policy context="default"> <policy context="default">
<allow send_interface="*"/> <allow send_interface="*"/>
<allow receive_interface="*"/> <allow receive_interface="*"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment