diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2016-02-08 20:32:34 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2016-02-12 15:26:33 +0000 |
commit | ec6b220e4d7efa7eabf8a9ade01a6685bf6ff145 (patch) | |
tree | 9d222c172b7396344b073dbb736d7bd94c11cf62 /test/name-test | |
parent | c7e179f5493fa43c022e097a1a3b106a432fe8e5 (diff) | |
download | dbus-ec6b220e4d7efa7eabf8a9ade01a6685bf6ff145.tar.gz |
name-test: run most C tests directly, not via run-test.sh
The exception is test-autolaunch, which is really not particularly
useful as a build-time test. The only way we can really test
autolaunch is as a whole-system integration test, and "make check"
is not that.
The two tests written in Python and one test based on dbus-send
are also not run directly yet; in particular, that includes both
the tests in run-test-systemserver.sh.
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Diffstat (limited to 'test/name-test')
-rw-r--r-- | test/name-test/Makefile.am | 28 | ||||
-rwxr-xr-x | test/name-test/run-test.sh | 10 |
2 files changed, 29 insertions, 9 deletions
diff --git a/test/name-test/Makefile.am b/test/name-test/Makefile.am index fae28920..877d4234 100644 --- a/test/name-test/Makefile.am +++ b/test/name-test/Makefile.am @@ -9,7 +9,15 @@ AM_LDFLAGS = @R_DYNAMIC_LDFLAG@ TEST_EXTENSIONS = .sh -SH_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/build-aux/tap-driver.sh +LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/build-aux/tap-driver.sh +SH_LOG_DRIVER = $(LOG_DRIVER) + +LOG_COMPILER = \ + @abs_top_builddir@/tools/dbus-run-session$(EXEEXT) \ + --config-file=@abs_builddir@/uninstalled-session.conf \ + --dbus-daemon=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \ + -- \ + $(NULL) SH_LOG_COMPILER = $(SHELL) ## note that TESTS has special meaning (stuff to use in make check) @@ -22,16 +30,34 @@ if DBUS_UNIX AM_TESTS_ENVIRONMENT = \ export DBUS_TOP_BUILDDIR=@abs_top_builddir@; \ export DBUS_TOP_SRCDIR=@abs_top_srcdir@; \ + export PATH="@abs_top_builddir@/bus:$$PATH"; \ export PYTHON=@PYTHON@; \ export DBUS_TEST_DATA=@abs_top_builddir@/test/data; \ export DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT); \ export DBUS_TEST_DBUS_LAUNCH=@abs_top_builddir@/tools/dbus-launch$(EXEEXT); \ export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \ + unset DBUS_SESSION_BUS_ADDRESS; \ + unset DBUS_SESSION_BUS_PID; \ $(NULL) +uninstalled-session.conf: $(top_builddir)/bus/session.conf Makefile + $(SED) -e 's|<standard_session_servicedirs.*$$|<servicedir>@abs_top_builddir@/test/data/valid-service-files</servicedir>|g' \ + -e 's|<include.*$$||g' \ + < $< > $@ + +check_DATA = \ + uninstalled-session.conf \ + $(NULL) + TESTS += \ run-test.sh \ run-test-systemserver.sh \ + test-ids \ + test-pending-call-dispatch \ + test-pending-call-timeout \ + test-privserver-client \ + test-shutdown \ + test-threads-init \ $(NULL) endif endif diff --git a/test/name-test/run-test.sh b/test/name-test/run-test.sh index 8b9e7ad1..092ec69f 100755 --- a/test/name-test/run-test.sh +++ b/test/name-test/run-test.sh @@ -67,14 +67,8 @@ py_test () { } test_num=1 -# TAP test plan: we will run 8 tests -echo "1..8" +# TAP test plan: we will run 2 tests +echo "1..2" -c_test test-ids -c_test test-pending-call-dispatch -c_test test-pending-call-timeout -c_test test-threads-init -c_test test-privserver-client -c_test test-shutdown py_test test-activation-forking.py c_test test-autolaunch |