tests: use the TAP formatter
authorLubomir Rintel <lkundrak@v3.sk>
Thu, 14 May 2015 12:45:57 +0000 (14:45 +0200)
committerLubomir Rintel <lkundrak@v3.sk>
Tue, 26 May 2015 11:51:45 +0000 (13:51 +0200)
The test results in standard format are easily integrated into CI systems.

19 files changed:
callouts/tests/Makefile.am
configure.ac
libnm-core/tests/Makefile.am
libnm-glib/tests/Makefile.am
libnm-util/tests/Makefile.am
libnm/tests/Makefile.am
src/devices/wifi/tests/Makefile.am
src/dhcp-manager/tests/Makefile.am
src/dnsmasq-manager/tests/Makefile.am
src/platform/tests/Makefile.am
src/rdisc/tests/Makefile.am
src/settings/plugins/ibft/tests/Makefile.am
src/settings/plugins/ifcfg-rh/tests/Makefile.am
src/settings/plugins/ifupdown/tests/Makefile.am
src/settings/plugins/keyfile/tests/Makefile.am
src/supplicant-manager/tests/Makefile.am
src/tests/Makefile.am
src/tests/config/Makefile.am
tools/run-test-valgrind.sh

index a0ed401..f3169d7 100644 (file)
@@ -29,6 +29,8 @@ test_dispatcher_envp_LDADD = \
 ###########################################
 
 @VALGRIND_RULES@
+AM_TESTS_FD_REDIRECT = --tap
+LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
 TESTS = test-dispatcher-envp
 
 endif
index 54faece..ba22057 100644 (file)
@@ -15,6 +15,7 @@ AC_INIT([NetworkManager], [nm_version],
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([build-aux])
+AC_REQUIRE_AUX_FILE([tap-driver.sh])
 
 AM_INIT_AUTOMAKE(1.12 tar-ustar no-dist-gzip dist-bzip2 -Wno-portability)  dnl NB: Do not [quote] this parameter.
 AM_MAINTAINER_MODE([enable])
index daa5825..13e3c01 100644 (file)
@@ -26,6 +26,8 @@ LDADD = \
        $(GLIB_LIBS)
 
 @VALGRIND_RULES@
+AM_TESTS_FD_REDIRECT = --tap
+LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
 TESTS = $(noinst_PROGRAMS)
 
 endif
index 7168d3d..a01a50e 100644 (file)
@@ -17,6 +17,8 @@ if WITH_VALGRIND
 else
 LOG_COMPILER = $(srcdir)/libnm-glib-test-launch.sh
 endif
+AM_TESTS_FD_REDIRECT = --tap
+LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
 TESTS = test-nm-client test-remote-settings-client
 
 ####### NMClient and non-settings tests #######
index 16a7f8f..f90fe8b 100644 (file)
@@ -11,6 +11,8 @@ AM_CPPFLAGS = \
        -DTEST_CERT_DIR=\"$(top_srcdir)/libnm-core/tests/certs/\"
 
 @VALGRIND_RULES@
+AM_TESTS_FD_REDIRECT = --tap
+LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
 TESTS = \
        test-settings-defaults \
        test-crypto \
index a2dafec..0e7db21 100644 (file)
@@ -22,6 +22,8 @@ if WITH_VALGRIND
 else
 LOG_COMPILER = $(srcdir)/libnm-test-launch.sh
 endif
+AM_TESTS_FD_REDIRECT = --tap
+LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
 TESTS = test-nm-client test-remote-settings-client test-secret-agent
 
 test_nm_client_SOURCES = \
index 2a7d784..72dc718 100644 (file)
@@ -24,5 +24,7 @@ test_wifi_ap_utils_SOURCES = \
 test_wifi_ap_utils_LDADD = $(top_builddir)/src/libNetworkManager.la
 
 @VALGRIND_RULES@
+AM_TESTS_FD_REDIRECT = --tap
+LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
 TESTS = test-wifi-ap-utils
 
index 8aa79a2..2fb39e0 100644 (file)
@@ -38,6 +38,8 @@ test_dhcp_utils_LDADD = \
 #################################
 
 @VALGRIND_RULES@
+AM_TESTS_FD_REDIRECT = --tap
+LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
 TESTS = test-dhcp-dhclient test-dhcp-utils
 
 EXTRA_DIST = \
index b51de6a..ed12255 100644 (file)
@@ -20,5 +20,7 @@ test_dnsmasq_utils_LDADD = \
        $(top_builddir)/src/libNetworkManager.la
 
 @VALGRIND_RULES@
+AM_TESTS_FD_REDIRECT = --tap
+LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
 TESTS = test-dnsmasq-utils
 
index 081023c..bc032d2 100644 (file)
@@ -109,8 +109,9 @@ test_cleanup_linux_CPPFLAGS = \
        -DKERNEL_HACKS=1
 test_cleanup_linux_LDADD = $(PLATFORM_LDADD)
 
-
 @VALGRIND_RULES@
+AM_TESTS_FD_REDIRECT = --tap
+LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
 TESTS = \
        test-address-fake \
        test-address-linux \
index 5d6f8b5..e10b34f 100644 (file)
@@ -33,5 +33,7 @@ test_rdisc_fake_LDADD = \
        $(top_builddir)/src/libNetworkManager.la
 
 @VALGRIND_RULES@
+AM_TESTS_FD_REDIRECT = --tap
+LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
 TESTS = test-rdisc-fake
 
index 3c7c94a..e7285e0 100644 (file)
@@ -33,6 +33,8 @@ test_ibft_LDADD = \
        $(top_builddir)/src/libNetworkManager.la
 
 @VALGRIND_RULES@
+AM_TESTS_FD_REDIRECT = --tap
+LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
 TESTS = test-ibft
 
 endif
index a3f6a05..f629830 100644 (file)
@@ -48,6 +48,8 @@ test_ifcfg_rh_utils_LDADD = \
        $(top_builddir)/src/libNetworkManager.la
 
 @VALGRIND_RULES@
+AM_TESTS_FD_REDIRECT = --tap
+LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
 TESTS = test-ifcfg-rh-utils test-ifcfg-rh
 
 endif
index 2e927db..e43a511 100644 (file)
@@ -25,6 +25,8 @@ test_ifupdown_LDADD = \
 
 # TODO: enable valgrind for ifupdown. Currently it fails.
 #@VALGRIND_RULES@
+AM_TESTS_FD_REDIRECT = --tap
+LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
 TESTS = test-ifupdown
 
 endif
index a79e20b..dffa276 100644 (file)
@@ -35,6 +35,8 @@ test_keyfile_LDADD = \
        $(CODE_COVERAGE_LDFLAGS)
 
 @VALGRIND_RULES@
+AM_TESTS_FD_REDIRECT = --tap
+LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
 TESTS = test-keyfile
 
 endif
index 85268dc..d53b7ff 100644 (file)
@@ -19,4 +19,6 @@ test_supplicant_config_LDADD = \
        $(top_builddir)/src/libNetworkManager.la
 
 @VALGRIND_RULES@
+AM_TESTS_FD_REDIRECT = --tap
+LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
 TESTS = test-supplicant-config
index 83632bd..fdda3b0 100644 (file)
@@ -117,6 +117,8 @@ EXTRA_DIST = test-secret-agent.py
 ###########################################
 
 @VALGRIND_RULES@
+AM_TESTS_FD_REDIRECT = --tap
+LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
 TESTS = \
        test-ip4-config \
        test-ip6-config \
index 42c6b9a..5936624 100644 (file)
@@ -24,6 +24,8 @@ test_config_LDADD = \
        $(top_builddir)/src/libNetworkManager.la
 
 @VALGRIND_RULES@
+AM_TESTS_FD_REDIRECT = --tap
+LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
 TESTS = test-config
 
 EXTRA_DIST = \
index f9f9646..e723d75 100755 (executable)
@@ -9,7 +9,7 @@ if [ "$1" = "--launch-dbus" ]; then
     trap "kill $DBUS_SESSION_BUS_PID" EXIT
     shift
 fi
-TEST="$1"; shift
+TEST="$1"
 
 if [ "$NMTST_NO_VALGRIND" != "" ]; then
        "$TEST"
@@ -27,7 +27,7 @@ $LIBTOOL --mode=execute "$VALGRIND" \
        --gen-suppressions=all \
        --suppressions="$SUPPRESSIONS" \
        --log-file="$LOGFILE" \
-       "$TEST"
+       "$@"
 RESULT=$?
 
 if [ $RESULT -eq 0 -a "$(wc -c "$LOGFILE" | awk '{print$1}')" -ne 0 ]; then