]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - Makefile.am
test: make unit tests relocatable
[thirdparty/systemd.git] / Makefile.am
index a4e7e56067c8e3d1e6561223cffa75b2c0f94f13..489cf3c1b73114b199efaa63668df4a9b7117d10 100644 (file)
@@ -149,7 +149,9 @@ TESTS =
 endif
 AM_TESTS_ENVIRONMENT = \
        export SYSTEMD_KBD_MODEL_MAP=$(abs_top_srcdir)/src/locale/kbd-model-map; \
-       export SYSTEMD_LANGUAGE_FALLBACK_MAP=$(abs_top_srcdir)/src/locale/language-fallback-map;
+       export SYSTEMD_LANGUAGE_FALLBACK_MAP=$(abs_top_srcdir)/src/locale/language-fallback-map; \
+       export TEST_DIR=$(abs_top_srcdir)/test; \
+       export PATH=$(abs_top_builddir):$$PATH;
 
 if ENABLE_BASH_COMPLETION
 dist_bashcompletion_DATA = $(dist_bashcompletion_data)
@@ -217,7 +219,6 @@ AM_CPPFLAGS = \
        -DLIBDIR=\"$(libdir)\" \
        -DROOTLIBDIR=\"$(rootlibdir)\" \
        -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
-       -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
        -I $(top_srcdir)/src \
        -I $(top_builddir)/src/basic \
        -I $(top_srcdir)/src/basic \
@@ -396,6 +397,7 @@ rootlibexec_PROGRAMS = \
        systemd-initctl \
        systemd-shutdown \
        systemd-remount-fs \
+       systemd-volatile-root \
        systemd-reply-password \
        systemd-fsck \
        systemd-ac-power \
@@ -537,6 +539,7 @@ nodist_systemunit_DATA = \
        units/system-update-cleanup.service \
        units/systemd-initctl.service \
        units/systemd-remount-fs.service \
+       units/systemd-volatile-root.service \
        units/systemd-ask-password-wall.service \
        units/systemd-ask-password-console.service \
        units/systemd-sysctl.service \
@@ -601,6 +604,7 @@ EXTRA_DIST += \
        units/system-update-cleanup.service.in \
        units/systemd-initctl.service.in \
        units/systemd-remount-fs.service.in \
+       units/systemd-volatile-root.service.in \
        units/systemd-update-utmp.service.in \
        units/systemd-update-utmp-runlevel.service.in \
        units/systemd-ask-password-wall.service.in \
@@ -669,6 +673,15 @@ EXTRA_DIST += \
 
 @INTLTOOL_POLICY_RULE@
 
+systemd-mount-install-hook:
+       -$(LN_S) systemd-mount $(DESTDIR)$(bindir)/systemd-umount
+
+systemd-mount-uninstall-hook:
+       -rm $(DESTDIR)$(bindir)/systemd-umount
+
+INSTALL_EXEC_HOOKS += systemd-mount-install-hook
+UNINSTALL_EXEC_HOOKS += systemd-mount-uninstall-hook
+
 # ------------------------------------------------------------------------------
 
 MANPAGES =
@@ -1064,7 +1077,9 @@ libshared_la_SOURCES = \
        src/shared/nsflags.h \
        src/shared/nsflags.c \
        src/shared/dissect-image.c \
-       src/shared/dissect-image.h
+       src/shared/dissect-image.h \
+       src/shared/volatile-util.c \
+       src/shared/volatile-util.h
 
 if HAVE_UTMP
 libshared_la_SOURCES += \
@@ -1512,6 +1527,7 @@ tests += \
        test-utf8 \
        test-ellipsize \
        test-util \
+       test-mount-util \
        test-cpu-set-util \
        test-hexdecoct \
        test-escape \
@@ -1714,13 +1730,15 @@ EXTRA_DIST += \
        test/test-execute/exec-restrict-namespaces-yes.service \
        test/test-execute/exec-restrict-namespaces-mnt.service \
        test/test-execute/exec-restrict-namespaces-mnt-blacklist.service \
+       test/test-execute/exec-read-only-path-succeed.service \
        test/bus-policy/hello.conf \
        test/bus-policy/methods.conf \
        test/bus-policy/ownerships.conf \
        test/bus-policy/signals.conf \
        test/bus-policy/check-own-rules.conf \
        test/bus-policy/many-rules.conf \
-       test/bus-policy/test.conf
+       test/bus-policy/test.conf \
+       test/hwdb/10-bad.hwdb
 
 
 EXTRA_DIST += \
@@ -1889,6 +1907,12 @@ test_util_SOURCES = \
 test_util_LDADD = \
        libsystemd-shared.la
 
+test_mount_util_SOURCES = \
+       src/test/test-mount-util.c
+
+test_mount_util_LDADD = \
+       libsystemd-shared.la
+
 test_hexdecoct_SOURCES = \
        src/test/test-hexdecoct.c
 
@@ -3056,6 +3080,13 @@ systemd_remount_fs_SOURCES = \
 systemd_remount_fs_LDADD = \
        libsystemd-shared.la
 
+# ------------------------------------------------------------------------------
+systemd_volatile_root_SOURCES = \
+       src/volatile-root/volatile-root.c
+
+systemd_volatile_root_LDADD = \
+       libsystemd-shared.la
+
 # ------------------------------------------------------------------------------
 systemd_cgroups_agent_SOURCES = \
        src/cgroups-agent/cgroups-agent.c
@@ -3981,19 +4012,19 @@ check_DATA += \
        test/sys
 endif
 
-# packed sysfs test tree
-test/sys: test/sys.tar.xz
-       -rm -rf test/sys
+# sysfs test tree
+test/sys: test/sys-script.py
+       -rm -rf $@
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
-       -touch test/sys
+       $(AM_V_GEN)$(top_srcdir)/test/sys-script.py $(dir $@)
+       -touch $@
 
 test-sys-distclean:
        -rm -rf test/sys
 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
 
 EXTRA_DIST += \
-       test/sys.tar.xz \
+       test/sys-script.py \
        test/udev-test.pl \
        test/hwdb-test.sh \
        test/rule-syntax-check.py \
@@ -4812,10 +4843,12 @@ EXTRA_DIST += \
 # ------------------------------------------------------------------------------
 if HAVE_LIBCRYPTSETUP
 rootlibexec_PROGRAMS += \
-       systemd-cryptsetup
+       systemd-cryptsetup \
+       systemd-veritysetup
 
 systemgenerator_PROGRAMS += \
-       systemd-cryptsetup-generator
+       systemd-cryptsetup-generator \
+       systemd-veritysetup-generator
 
 dist_systemunit_DATA += \
        units/cryptsetup.target \
@@ -4838,6 +4871,23 @@ systemd_cryptsetup_generator_SOURCES = \
 systemd_cryptsetup_generator_LDADD = \
        libsystemd-shared.la
 
+systemd_veritysetup_SOURCES = \
+       src/veritysetup/veritysetup.c
+
+systemd_veritysetup_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(LIBCRYPTSETUP_CFLAGS)
+
+systemd_veritysetup_LDADD = \
+       libsystemd-shared.la \
+       $(LIBCRYPTSETUP_LIBS)
+
+systemd_veritysetup_generator_SOURCES = \
+       src/veritysetup/veritysetup-generator.c
+
+systemd_veritysetup_generator_LDADD = \
+       libsystemd-shared.la
+
 SYSINIT_TARGET_WANTS += \
        cryptsetup.target
 
@@ -5588,7 +5638,7 @@ test_dns_packet_SOURCES = \
 
 test_dns_packet_CPPFLAGS = \
        $(AM_CPPFLAGS) \
-       -DRESOLVE_TEST_DIR=\"$(abs_top_srcdir)/src/resolve/test-data\"
+       -I $(top_srcdir)/src/test
 
 test_dns_packet_CFLAGS = \
        $(AM_CFLAGS) \
@@ -5600,17 +5650,17 @@ test_dns_packet_LDADD = \
        -lm
 
 EXTRA_DIST += \
-       src/resolve/test-data/_openpgpkey.fedoraproject.org.pkts \
-       src/resolve/test-data/fedoraproject.org.pkts \
-       src/resolve/test-data/gandi.net.pkts \
-       src/resolve/test-data/google.com.pkts \
-       src/resolve/test-data/root.pkts \
-       src/resolve/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts \
-       src/resolve/test-data/teamits.com.pkts \
-       src/resolve/test-data/zbyszek@fedoraproject.org.pkts \
-       src/resolve/test-data/_443._tcp.fedoraproject.org.pkts \
-       src/resolve/test-data/kyhwana.org.pkts \
-       src/resolve/test-data/fake-caa.pkts
+       test/test-resolve/_openpgpkey.fedoraproject.org.pkts \
+       test/test-resolve/fedoraproject.org.pkts \
+       test/test-resolve/gandi.net.pkts \
+       test/test-resolve/google.com.pkts \
+       test/test-resolve/root.pkts \
+       test/test-resolve/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts \
+       test/test-resolve/teamits.com.pkts \
+       test/test-resolve/zbyszek@fedoraproject.org.pkts \
+       test/test-resolve/_443._tcp.fedoraproject.org.pkts \
+       test/test-resolve/kyhwana.org.pkts \
+       test/test-resolve/fake-caa.pkts
 
 test_dnssec_SOURCES = \
        src/resolve/test-dnssec.c \
@@ -5707,6 +5757,8 @@ libnetworkd_core_la_SOURCES = \
        src/network/networkd-link.c \
        src/network/networkd-link-bus.c \
        src/network/networkd-ipv4ll.c \
+       src/network/networkd-ipv6-proxy-ndp.h \
+       src/network/networkd-ipv6-proxy-ndp.c \
        src/network/networkd-dhcp4.c \
        src/network/networkd-dhcp6.c \
        src/network/networkd-ndisc.h \
@@ -6116,6 +6168,8 @@ EXTRA_DIST += \
        test/TEST-13-NSPAWN-SMOKE/Makefile \
        test/TEST-13-NSPAWN-SMOKE/create-busybox-container \
        test/TEST-13-NSPAWN-SMOKE/test.sh \
+       test/TEST-14-MACHINE-ID/Makefile \
+       test/TEST-14-MACHINE-ID/test.sh \
        test/test-functions
 
 EXTRA_DIST += \
@@ -6193,6 +6247,7 @@ substitutions = \
 SED_PROCESS = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
        $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
+                -e '/^\#\# /d' \
                < $< > $@
 
 units/%: units/%.in