]> git.ipfire.org Git - people/ms/network.git/blobdiff - Makefile.am
tests: Add new test that creates two dummy interfaces
[people/ms/network.git] / Makefile.am
index 466ad735058afda8a2b788c59692a471800f8cf9..2df9185de33db2e95234bf19ee4ca3e0503e6b13 100644 (file)
@@ -59,6 +59,7 @@ DISTCLEANFILES =
 EXTRA_DIST =
 INSTALL_DIRS =
 INSTALL_EXEC_HOOKS =
+TESTS =
 UNINSTALL_EXEC_HOOKS =
 noinst_DATA =
 network_PROGRAMS =
@@ -319,6 +320,7 @@ dist_networkd_SOURCES = \
        src/networkd/daemon-bus.h \
        src/networkd/devmon.c \
        src/networkd/devmon.h \
+       src/networkd/json.h \
        src/networkd/link.c \
        src/networkd/link.h \
        src/networkd/links.c \
@@ -689,12 +691,10 @@ TESTS_ENVIRONMENT = \
 
 dist_check_DATA = \
        test/constants.sh \
-       test/test-functions
+       test/test-functions \
+       test/networkd/test.sh
 
 dist_check_SCRIPTS = \
-       $(TESTS)
-
-TESTS = \
        test/load-library \
        test/functions/ip/ip_detect_protocol \
        test/functions/ip/ip_get_prefix \
@@ -705,6 +705,24 @@ TESTS = \
        test/functions/ip/ip_protocol_is_supported \
        test/functions/ip/ip_split_prefix
 
+TESTS += $(dist_check_SCRIPTS)
+
+TEST_EXTENSIONS = .t
+
+NETWORKD_TESTS = \
+       test/networkd/00_launch.t \
+       test/networkd/01_dummy.t
+
+TESTS += $(NETWORKD_TESTS)
+
+EXTRA_DIST += \
+       test/networkd/test.sh \
+       $(NETWORKD_TESTS)
+
+# Run all networkd tests in their own namespaces
+T_LOG_COMPILER = unshare --net --ipc --uts --user --cgroup --time --pid --fork \
+       --map-root-user --keep-caps $(SHELL) test/networkd/test.sh
+
 # - NITSI tests ----------------------------------------------------------------
 
 # Files for the virtual environment