]> git.ipfire.org Git - network.git/blobdiff - Makefile.am
networkd: Add a simple test environment
[network.git] / Makefile.am
index f4c22b4837826f4588367d486b9125a7b954ddc3..fe1e4d1fe719c0c293c6694046e324e320e9c4f3 100644 (file)
@@ -59,6 +59,7 @@ DISTCLEANFILES =
 EXTRA_DIST =
 INSTALL_DIRS =
 INSTALL_EXEC_HOOKS =
+TESTS =
 UNINSTALL_EXEC_HOOKS =
 noinst_DATA =
 network_PROGRAMS =
@@ -690,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 \
@@ -706,6 +705,23 @@ 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
+
+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 \
+       $(SHELL) test/networkd/test.sh
+
 # - NITSI tests ----------------------------------------------------------------
 
 # Files for the virtual environment