]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - Makefile.am
test: make unit tests relocatable
[thirdparty/systemd.git] / Makefile.am
index d75807a9f924498c94c6658761bdb356ac3daabb..489cf3c1b73114b199efaa63668df4a9b7117d10 100644 (file)
@@ -150,6 +150,7 @@ 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 TEST_DIR=$(abs_top_srcdir)/test; \
        export PATH=$(abs_top_builddir):$$PATH;
 
 if ENABLE_BASH_COMPLETION
@@ -218,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 \
@@ -397,6 +397,7 @@ rootlibexec_PROGRAMS = \
        systemd-initctl \
        systemd-shutdown \
        systemd-remount-fs \
+       systemd-volatile-root \
        systemd-reply-password \
        systemd-fsck \
        systemd-ac-power \
@@ -538,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 \
@@ -602,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 \
@@ -670,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 =
@@ -1065,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 += \
@@ -1716,6 +1730,7 @@ 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 \
@@ -3065,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
@@ -3990,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 \
@@ -4821,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 \
@@ -4847,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
 
@@ -5597,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) \
@@ -5609,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 \
@@ -5716,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 \
@@ -6204,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