diff options
| author | Dan Winship <danw@gnome.org> | 2014-07-30 17:32:35 -0400 |
|---|---|---|
| committer | Dan Winship <danw@gnome.org> | 2014-08-01 11:55:49 -0400 |
| commit | ade4f2e84e0fa3df47d8db4140652ca50b8e9fa8 (patch) | |
| tree | 65723ed8376f088bff185091c95ef76918b06c99 /libnm-glib | |
| parent | 4f7e9bd33637b38eee6c2bfb4340166a5e218486 (diff) | |
| download | NetworkManager-ade4f2e84e0fa3df47d8db4140652ca50b8e9fa8.tar.gz | |
libnm-glib: use automake test infrastructure for test programs
Use "TESTS = tests-nm-client test-remote-settings-client" rather than
overriding "check-local".
Add a script "libnm-test-launch.sh" that will handle redirecting the
test via dbus-launch if needed.
Diffstat (limited to 'libnm-glib')
| -rw-r--r-- | libnm-glib/tests/Makefile.am | 15 | ||||
| -rwxr-xr-x | libnm-glib/tests/libnm-glib-test-launch.sh | 7 |
2 files changed, 13 insertions, 9 deletions
diff --git a/libnm-glib/tests/Makefile.am b/libnm-glib/tests/Makefile.am index 2723aa4479..dc5a7b8771 100644 --- a/libnm-glib/tests/Makefile.am +++ b/libnm-glib/tests/Makefile.am @@ -10,7 +10,9 @@ AM_CPPFLAGS = \ $(GLIB_CFLAGS) \ $(DBUS_CFLAGS) -noinst_PROGRAMS = test-nm-client test-remote-settings-client +noinst_PROGRAMS = $(TESTS) + +TESTS = test-nm-client test-remote-settings-client ####### NMClient and non-settings tests ####### @@ -36,13 +38,8 @@ test_remote_settings_client_LDADD = \ ########################################### -check-local: test-nm-client test-remote-settings-client - if test -z "$$DBUS_SESSION_BUS_ADDRESS" ; then \ - dbus-launch --exit-with-session $(abs_builddir)/test-nm-client; \ - dbus-launch --exit-with-session $(abs_builddir)/test-remote-settings-client; \ - else \ - $(abs_builddir)/test-nm-client; \ - $(abs_builddir)/test-remote-settings-client; \ - fi; +TESTS_ENVIRONMENT = $(srcdir)/libnm-glib-test-launch.sh endif + +EXTRA_DIST = libnm-glib-test-launch.sh diff --git a/libnm-glib/tests/libnm-glib-test-launch.sh b/libnm-glib/tests/libnm-glib-test-launch.sh new file mode 100755 index 0000000000..1db656ad06 --- /dev/null +++ b/libnm-glib/tests/libnm-glib-test-launch.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then + exec dbus-launch --exit-with-session "$@" +else + exec "$@" +fi |
