summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2018-01-22 17:52:55 +0000
committerSimon McVittie <smcv@debian.org>2018-01-22 18:35:43 +0000
commitc20597919cd35b513e7a8eb2fa59cb0cec900606 (patch)
tree875d4fa92e6a348376b6293783c8a517e81716d1
parent449f30a089ce848883fcf2b6aaac742f87aad704 (diff)
downloaddbus-glib-c20597919cd35b513e7a8eb2fa59cb0cec900606.tar.gz
Move tests for dbus-gmain to dbus-gmain/tests/
Use dbus-run-session to run the only one that can be used as an automated test right now. Signed-off-by: Simon McVittie <smcv@debian.org>
-rw-r--r--configure.ac5
-rw-r--r--dbus-gmain/Makefile.am59
-rw-r--r--dbus-gmain/tests/30574.c (renamed from test/core/30574.c)2
-rw-r--r--dbus-gmain/tests/test-thread-client.c (renamed from test/core/test-thread-client.c)0
-rw-r--r--dbus-gmain/tests/test-thread-server.c (renamed from test/core/test-thread-server.c)0
-rw-r--r--dbus-gmain/tests/test-thread.h (renamed from test/core/test-thread.h)0
-rw-r--r--dbus-gmain/tests/util.c (renamed from test/lib/util.c)0
-rw-r--r--dbus-gmain/tests/util.h (renamed from test/lib/util.h)0
-rw-r--r--test/Makefile.am4
-rw-r--r--test/core/Makefile.am38
-rw-r--r--test/core/peer-on-bus.c2
-rw-r--r--test/core/registrations.c2
-rwxr-xr-xtest/core/run-test.sh1
-rw-r--r--test/core/test-dbus-glib.c2
-rw-r--r--test/core/test-variant-recursion.c2
-rw-r--r--test/interfaces/Makefile.am2
-rw-r--r--test/interfaces/test-client.c2
-rw-r--r--test/lib/Makefile.am19
18 files changed, 73 insertions, 67 deletions
diff --git a/configure.ac b/configure.ac
index 2cdee95..bd97d74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -278,6 +278,10 @@ DBUS_GLIB_TOOL_LIBS="$XML_LIBS"
AC_SUBST(DBUS_GLIB_TOOL_CFLAGS)
AC_SUBST(DBUS_GLIB_TOOL_LIBS)
+AC_ARG_VAR([DBUS_RUN_SESSION],
+ [The dbus-run-session tool from dbus 1.8 or later])
+AC_PATH_PROG([DBUS_RUN_SESSION], [dbus-run-session], [dbus-run-session])
+
### gtk-doc Documentation
GTK_DOC_CHECK([1.14], [--flavour no-tmpl])
@@ -297,7 +301,6 @@ test/interfaces/Makefile
test/data/valid-service-files/debug-glib.service
test/data/valid-service-files/debug-echo.service
test/data/valid-service-files/interfaces-test.service
-test/lib/Makefile
tools/Makefile
dbus-glib-1.pc
dbus-glib-1-uninstalled.pc
diff --git a/dbus-gmain/Makefile.am b/dbus-gmain/Makefile.am
index 4b4291e..1863a1f 100644
--- a/dbus-gmain/Makefile.am
+++ b/dbus-gmain/Makefile.am
@@ -5,7 +5,10 @@ AM_CPPFLAGS = \
$(DBUS_GLIB_CFLAGS) \
$(NULL)
-noinst_LTLIBRARIES = libdbus-gmain.la
+noinst_LTLIBRARIES = \
+ libdbus-gmain.la \
+ tests/libtest.la \
+ $(NULL)
libdbus_gmain_la_SOURCES = \
dbus-gmain.c \
@@ -14,3 +17,57 @@ libdbus_gmain_la_SOURCES = \
libdbus_gmain_la_LIBADD = $(DBUS_LIBS) $(DBUS_GLIB_LIBS)
libdbus_gmain_la_LDFLAGS = -no-undefined
+
+tests_libtest_la_SOURCES = \
+ tests/util.c \
+ tests/util.h \
+ $(NULL)
+
+tests_libtest_la_LIBADD = $(DBUS_LIBS) $(DBUS_GLIB_LIBS)
+tests_libtest_la_LDFLAGS = -no-undefined
+
+TESTS = \
+ tests/test-30574 \
+ $(NULL)
+
+noinst_PROGRAMS = \
+ tests/test-30574 \
+ tests/test-thread-server \
+ tests/test-thread-client \
+ $(NULL)
+
+tests_test_thread_server_SOURCES = \
+ tests/test-thread-server.c \
+ tests/test-thread.h \
+ $(NULL)
+tests_test_thread_server_LDADD = \
+ libdbus-gmain.la \
+ tests/libtest.la \
+ $(DBUS_GLIB_THREADS_LIBS) \
+ $(DBUS_GLIB_LIBS) \
+ $(DBUS_LIBS) \
+ $(NULL)
+
+tests_test_thread_client_SOURCES = \
+ tests/test-thread-client.c \
+ tests/test-thread.h \
+ $(NULL)
+tests_test_thread_client_LDADD = \
+ libdbus-gmain.la \
+ tests/libtest.la \
+ $(DBUS_GLIB_THREADS_LIBS) \
+ $(DBUS_GLIB_LIBS) \
+ $(DBUS_LIBS) \
+ $(NULL)
+
+tests_test_30574_SOURCES = \
+ tests/30574.c \
+ $(NULL)
+tests_test_30574_LDADD = \
+ libdbus-gmain.la \
+ tests/libtest.la \
+ $(DBUS_GLIB_LIBS) \
+ $(DBUS_LIBS) \
+ $(NULL)
+
+LOG_COMPILER = $(DBUS_RUN_SESSION) --
diff --git a/test/core/30574.c b/dbus-gmain/tests/30574.c
index 6fa1c88..3c7e109 100644
--- a/test/core/30574.c
+++ b/dbus-gmain/tests/30574.c
@@ -5,7 +5,7 @@
#include <dbus/dbus.h>
#include <glib.h>
#include <dbus-gmain/dbus-gmain.h>
-#include "test/lib/util.h"
+#include "util.h"
DBusConnection *bus;
GMainContext *main_context;
diff --git a/test/core/test-thread-client.c b/dbus-gmain/tests/test-thread-client.c
index 2310a14..2310a14 100644
--- a/test/core/test-thread-client.c
+++ b/dbus-gmain/tests/test-thread-client.c
diff --git a/test/core/test-thread-server.c b/dbus-gmain/tests/test-thread-server.c
index 15b8b24..15b8b24 100644
--- a/test/core/test-thread-server.c
+++ b/dbus-gmain/tests/test-thread-server.c
diff --git a/test/core/test-thread.h b/dbus-gmain/tests/test-thread.h
index 8c78fba..8c78fba 100644
--- a/test/core/test-thread.h
+++ b/dbus-gmain/tests/test-thread.h
diff --git a/test/lib/util.c b/dbus-gmain/tests/util.c
index e819584..e819584 100644
--- a/test/lib/util.c
+++ b/dbus-gmain/tests/util.c
diff --git a/test/lib/util.h b/dbus-gmain/tests/util.h
index 7f5cb07..7f5cb07 100644
--- a/test/lib/util.h
+++ b/dbus-gmain/tests/util.h
diff --git a/test/Makefile.am b/test/Makefile.am
index 14c5abf..e538f2d 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,5 +1,5 @@
-SUBDIRS = lib . core interfaces
-DIST_SUBDIRS = lib core interfaces
+SUBDIRS = . core interfaces
+DIST_SUBDIRS = core interfaces
AM_CPPFLAGS = \
-I$(top_srcdir) \
diff --git a/test/core/Makefile.am b/test/core/Makefile.am
index 1381e73..314ff40 100644
--- a/test/core/Makefile.am
+++ b/test/core/Makefile.am
@@ -12,7 +12,7 @@ LDADD = \
$(DBUS_GLIB_LIBS) \
$(DBUS_LIBS) \
$(top_builddir)/dbus/libdbus-glib-1.la \
- $(top_builddir)/test/lib/libtest.la \
+ $(top_builddir)/dbus-gmain/tests/libtest.la \
$(NULL)
tool_ldadd = \
@@ -55,42 +55,17 @@ EXTRA_DIST = \
if DBUS_BUILD_TESTS
-THREAD_APPS=test-thread-server test-thread-client test-profile
-
-test_thread_server_SOURCES= \
- test-thread-server.c \
- test-thread.h
-test_thread_server_LDADD = \
- $(DBUS_GLIB_THREADS_LIBS) \
- $(DBUS_GLIB_LIBS) \
- $(DBUS_LIBS) \
- $(top_builddir)/dbus-gmain/libdbus-gmain.la \
- $(top_builddir)/test/lib/libtest.la \
- $(NULL)
-
-test_thread_client_SOURCES= \
- test-thread-client.c \
- test-thread.h
-test_thread_client_LDADD = \
- $(DBUS_GLIB_THREADS_LIBS) \
- $(DBUS_GLIB_LIBS) \
- $(DBUS_LIBS) \
- $(top_builddir)/dbus-gmain/libdbus-gmain.la \
- $(top_builddir)/test/lib/libtest.la \
- $(NULL)
-
## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
## build even when not doing "make check"
noinst_PROGRAMS = \
test-dbus-glib \
test-error-mapping \
test-service-glib \
- $(THREAD_APPS) \
+ test-profile \
manual/test-invalid-usage \
peer-server \
peer-client \
test-types \
- test-30574 \
test-private \
test-peer-on-bus \
test-proxy-noc \
@@ -109,15 +84,6 @@ manual_test_invalid_usage_SOURCES = \
my-object.h \
$(NULL)
-test_30574_SOURCES = \
- 30574.c
-test_30574_LDADD = \
- $(DBUS_GLIB_LIBS) \
- $(DBUS_LIBS) \
- $(top_builddir)/dbus-gmain/libdbus-gmain.la \
- $(top_builddir)/test/lib/libtest.la \
- $(NULL)
-
test_private_SOURCES = \
my-object.c \
my-object.h \
diff --git a/test/core/peer-on-bus.c b/test/core/peer-on-bus.c
index 50a15b5..a1eb231 100644
--- a/test/core/peer-on-bus.c
+++ b/test/core/peer-on-bus.c
@@ -40,7 +40,7 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
-#include "test/lib/util.h"
+#include "dbus-gmain/tests/util.h"
GMainLoop *loop = NULL;
diff --git a/test/core/registrations.c b/test/core/registrations.c
index 29afb30..0eea468 100644
--- a/test/core/registrations.c
+++ b/test/core/registrations.c
@@ -42,7 +42,7 @@
#include "my-object.h"
-#include "test/lib/util.h"
+#include "dbus-gmain/tests/util.h"
GMainLoop *loop = NULL;
diff --git a/test/core/run-test.sh b/test/core/run-test.sh
index fe4dc21..fe0d3f8 100755
--- a/test/core/run-test.sh
+++ b/test/core/run-test.sh
@@ -49,7 +49,6 @@ else
${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/core/test-dbus-glib || die "test-dbus-glib failed"
${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/core/test-variant-recursion || die "test-variant-recursion failed"
${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/core/test-gvariant || die "test-gvariant failed"
- ${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/core/test-30574 || die "test-30574 failed"
${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/core/test-private || die "test-private failed"
${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/core/test-error-mapping || die "test-error-mapping failed"
${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/core/test-peer-on-bus || die "test-peer-on-bus failed"
diff --git a/test/core/test-dbus-glib.c b/test/core/test-dbus-glib.c
index cd5506e..1ae2ec7 100644
--- a/test/core/test-dbus-glib.c
+++ b/test/core/test-dbus-glib.c
@@ -38,7 +38,7 @@
#include <glib.h>
#include <glib-object.h>
#include "my-object.h"
-#include "test/lib/util.h"
+#include "dbus-gmain/tests/util.h"
GMainLoop *loop = NULL;
diff --git a/test/core/test-variant-recursion.c b/test/core/test-variant-recursion.c
index dfb8e12..507ea4d 100644
--- a/test/core/test-variant-recursion.c
+++ b/test/core/test-variant-recursion.c
@@ -11,7 +11,7 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
-#include "test/lib/util.h"
+#include "dbus-gmain/tests/util.h"
static gboolean
make_recursive_stringify_call (int recursion_depth,
diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am
index 6171a54..fa5ae33 100644
--- a/test/interfaces/Makefile.am
+++ b/test/interfaces/Makefile.am
@@ -9,7 +9,7 @@ AM_CPPFLAGS = \
LDADD = $(DBUS_GLIB_LIBS) \
$(top_builddir)/dbus/libdbus-glib-1.la \
$(top_builddir)/dbus/libdbus-gtool.la \
- $(top_builddir)/test/lib/libtest.la \
+ $(top_builddir)/dbus-gmain/tests/libtest.la \
$(NULL)
## note that TESTS has special meaning (stuff to use in make check)
diff --git a/test/interfaces/test-client.c b/test/interfaces/test-client.c
index dcd21a5..c3348e4 100644
--- a/test/interfaces/test-client.c
+++ b/test/interfaces/test-client.c
@@ -13,7 +13,7 @@
#include "test-dup-prop-a-bindings.h"
#include "test-dup-prop-b-bindings.h"
-#include "test/lib/util.h"
+#include "dbus-gmain/tests/util.h"
#define TEST_NAMESPACE "org.freedesktop.DBus.GLib.Test.Interfaces"
#define TEST_OBJECT_PATH "/org/freedesktop/DBus/GLib/Test/Interfaces"
diff --git a/test/lib/Makefile.am b/test/lib/Makefile.am
deleted file mode 100644
index 8a2670b..0000000
--- a/test/lib/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-AM_CPPFLAGS = \
- -I$(top_srcdir) \
- -I$(top_builddir) \
- $(DBUS_CFLAGS) \
- $(DBUS_GLIB_CFLAGS) \
- $(NULL)
-
-noinst_LTLIBRARIES = libtest.la
-
-libtest_la_SOURCES = \
- util.c \
- util.h \
- $(NULL)
-
-libtest_la_LIBADD = \
- $(top_builddir)/dbus/libdbus-glib-1.la \
- $(DBUS_LIBS) \
- $(DBUS_GLIB_LIBS) \
- $(NULL)