]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - Makefile.am
resolved: default to the compile-time fallback hostname
[thirdparty/systemd.git] / Makefile.am
index 9a435e3a662f97fad9b8b6200ef96378156ec82f..dd10aabd360e43eacd8e31667cc56f1b7544c0a2 100644 (file)
@@ -93,6 +93,7 @@ kernelinstalldir = $(prefix)/lib/kernel/install.d
 factory_etcdir = $(datadir)/factory/etc
 factory_pamdir = $(datadir)/factory/etc/pam.d
 bootlibdir = $(prefix)/lib/systemd/boot/efi
+testsdir = $(prefix)/lib/systemd/tests
 
 # And these are the special ones for /
 rootprefix=@rootprefix@
@@ -133,6 +134,7 @@ check_DATA =
 dist_rootlibexec_DATA =
 tests=
 manual_tests =
+TEST_DATA_FILES =
 TEST_EXTENSIONS = .py
 PY_LOG_COMPILER = $(PYTHON)
 DISABLE_HARD_ERRORS = yes
@@ -218,7 +220,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 \
@@ -250,6 +251,8 @@ AM_CPPFLAGS = \
        -I $(top_srcdir)/src/libsystemd/sd-device \
        -I $(top_srcdir)/src/libsystemd/sd-id128 \
        -I $(top_srcdir)/src/libsystemd-network \
+       -DABS_SRC_DIR=\"$(abs_top_srcdir)\" \
+       -DABS_BUILD_DIR=\"$(abs_top_builddir)\" \
        $(OUR_CPPFLAGS)
 
 AM_CFLAGS = $(OUR_CFLAGS)
@@ -958,7 +961,9 @@ libbasic_la_SOURCES = \
        src/basic/format-util.h \
        src/basic/nss-util.h \
        src/basic/khash.h \
-       src/basic/khash.c
+       src/basic/khash.c \
+       src/basic/journal-importer.h \
+       src/basic/journal-importer.c
 
 nodist_libbasic_la_SOURCES = \
        src/basic/errno-from-name.h \
@@ -1594,7 +1599,8 @@ tests += \
        test-rlimit-util \
        test-signal-util \
        test-selinux \
-       test-sizeof
+       test-sizeof \
+       test-journal-importer
 
 if HAVE_ACL
 tests += \
@@ -1606,7 +1612,7 @@ tests += \
        test-seccomp
 endif
 
-EXTRA_DIST += \
+TEST_DATA_FILES += \
        test/a.service \
        test/basic.target \
        test/b.service \
@@ -1730,6 +1736,9 @@ 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/test-execute/exec-privatedevices-yes-capability-sys-rawio.service \
+       test/test-execute/exec-privatedevices-no-capability-sys-rawio.service \
        test/bus-policy/hello.conf \
        test/bus-policy/methods.conf \
        test/bus-policy/ownerships.conf \
@@ -2457,6 +2466,16 @@ test_arphrd_list_SOURCES = \
 test_arphrd_list_LDADD = \
        libsystemd-shared.la
 
+test_journal_importer_SOURCES = \
+       src/test/test-journal-importer.c
+
+test_journal_importer_LDADD = \
+       libsystemd-shared.la
+
+TEST_DATA_FILES += \
+       test/journal-data/journal-1.txt \
+       test/journal-data/journal-2.txt
+
 # ------------------------------------------------------------------------------
 ## .PHONY so it always rebuilds it
 .PHONY: coverage lcov-run lcov-report coverage-sync
@@ -4011,19 +4030,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 \
@@ -5637,7 +5656,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) \
@@ -5648,18 +5667,20 @@ test_dns_packet_LDADD = \
        $(GCRYPT_LIBS) \
        -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_DATA_FILES += \
+       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
+
+EXTRA_DIST += $(TEST_DATA_FILES)
 
 test_dnssec_SOURCES = \
        src/resolve/test-dnssec.c \
@@ -5756,6 +5777,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 \
@@ -6244,6 +6267,7 @@ substitutions = \
 SED_PROCESS = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
        $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
+                -e '/^\#\# /d' \
                < $< > $@
 
 units/%: units/%.in
@@ -6592,7 +6616,7 @@ valgrind-tests: $(TESTS)
                if $(LIBTOOL) --mode=execute file $$f | grep -q shell; then \
                echo -e "$${x}Skipping non-binary $$f"; else \
                echo -e "$${x}Running $$f"; \
-               $(LIBTOOL) --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
+               $(AM_TESTS_ENVIRONMENT) $(LIBTOOL) --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
                x="\n\n"; \
        done
 
@@ -6690,6 +6714,20 @@ tests += \
        test-libsystemd-sym \
        test-libudev-sym
 
+.PHONY: install-tests
+install-tests: $(tests) $(TEST_DATA_FILES)
+       for f in $(tests); do \
+           if [ -x $(top_builddir)/.libs/$$f ]; then \
+               install -D -m 755 $(top_builddir)/.libs/$$f $(DESTDIR)/$(testsdir)/$$f; \
+           else \
+               install -D -m 755 $(top_builddir)/$$f $(DESTDIR)/$(testsdir)/$$f; \
+           fi; \
+       done
+       for f in $(TEST_DATA_FILES); do \
+           install -D -m 644 $(top_srcdir)/$$f $(DESTDIR)/$(testsdir)/testdata/$${f#test/}; \
+       done
+
+
 .PHONY: cppcheck
 cppcheck:
        cppcheck --enable=all -q $(top_srcdir)