chiark / gitweb /
test: add integration test for systemd-sysv-generator
[elogind.git] / Makefile.am
index 4bbe69ebafd181820f6dcff7f980ce1443e88d7b..406910a3c2ff3561c5eb495b5d7029f7fc25e48c 100644 (file)
@@ -148,6 +148,8 @@ check_PROGRAMS =
 check_DATA =
 tests=
 manual_tests =
+TEST_EXTENSIONS = .py
+PY_LOG_COMPILER = $(PYTHON)
 if ENABLE_TESTS
 noinst_PROGRAMS = $(manual_tests) $(tests)
 TESTS = $(tests)
@@ -368,6 +370,7 @@ bin_PROGRAMS = \
        systemd-delta \
        systemd-analyze \
        systemd-run \
+       systemd-stdio-bridge \
        systemd-path
 
 dist_bin_SCRIPTS = \
@@ -2023,11 +2026,10 @@ test_conf_files_LDADD = \
        libsystemd-shared.la
 
 test_bus_policy_SOURCES = \
-       src/bus-proxyd/test-bus-xml-policy.c \
-       src/bus-proxyd/bus-xml-policy.c \
-       src/bus-proxyd/bus-xml-policy.h
+       src/bus-proxyd/test-bus-xml-policy.c
 
 test_bus_policy_LDADD = \
+       libsystemd-proxy.la \
        libsystemd-internal.la \
        libsystemd-shared.la
 
@@ -2679,8 +2681,10 @@ systemd_run_LDADD = \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
-systemd_bus_proxyd_SOURCES = \
-       src/bus-proxyd/bus-proxyd.c \
+noinst_LTLIBRARIES += \
+       libsystemd-proxy.la
+
+libsystemd_proxy_la_SOURCES = \
        src/bus-proxyd/bus-xml-policy.c \
        src/bus-proxyd/bus-xml-policy.h \
        src/bus-proxyd/driver.c \
@@ -2690,41 +2694,54 @@ systemd_bus_proxyd_SOURCES = \
        src/bus-proxyd/synthesize.c \
        src/bus-proxyd/synthesize.h
 
-systemd_bus_proxyd_LDADD = \
+libsystemd_proxy_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       -pthread
+
+libsystemd_proxy_la_LIBADD = \
        libsystemd-internal.la \
        libsystemd-shared.la
 
-bus-proxyd-install-hook:
-       $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir)
-       $(AM_V_RM)rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
-       $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
+systemd_bus_proxyd_SOURCES = \
+       src/bus-proxyd/bus-proxyd.c
+
+systemd_bus_proxyd_CFLAGS = \
+       $(AM_CFLAGS) \
+       -pthread
+
+systemd_bus_proxyd_LDADD = \
+       libsystemd-proxy.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la
 
-bus-proxyd-uninstall-hook:
-       rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
+systemd_stdio_bridge_SOURCES = \
+       src/bus-proxyd/stdio-bridge.c
 
-INSTALL_EXEC_HOOKS += bus-proxyd-install-hook
-UNINSTALL_EXEC_HOOKS += bus-proxyd-uninstall-hook
+systemd_stdio_bridge_LDADD = \
+       libsystemd-proxy.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la
 
 if ENABLE_KDBUS
 nodist_systemunit_DATA += \
-       units/systemd-bus-proxyd@.service
+       units/systemd-bus-proxyd.service
 
 dist_systemunit_DATA += \
        units/systemd-bus-proxyd.socket
 
 nodist_userunit_DATA += \
-       units/user/systemd-bus-proxyd@.service
+       units/user/systemd-bus-proxyd.service
 
 dist_userunit_DATA += \
        units/user/systemd-bus-proxyd.socket
 endif
 
 EXTRA_DIST += \
-       units/systemd-bus-proxyd@.service.m4.in \
-       units/user/systemd-bus-proxyd@.service.in
+       units/systemd-bus-proxyd.service.m4.in \
+       units/user/systemd-bus-proxyd.service.in
 
 CLEANFILES += \
-       units/systemd-bus-proxyd@.service.m4
+       units/systemd-bus-proxyd.service.m4
 
 if HAVE_SMACK
 bus-proxyd-set-cap-hook:
@@ -3751,7 +3768,14 @@ endif
 # ------------------------------------------------------------------------------
 TESTS += \
        test/udev-test.pl \
-       test/rules-test.sh
+       $(NULL)
+
+if HAVE_PYTHON
+TESTS += \
+       test/rule-syntax-check.py \
+       test/sysv-generator-test.py \
+       $(NULL)
+endif
 
 manual_tests += \
        test-libudev \
@@ -3795,8 +3819,10 @@ DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
 EXTRA_DIST += \
        test/sys.tar.xz \
        test/udev-test.pl \
-       test/rules-test.sh \
-       test/rule-syntax-check.py
+       test/rule-syntax-check.py \
+       test/sysv-generator-test.py \
+       $(NULL)
+
 
 # ------------------------------------------------------------------------------
 ata_id_SOURCES = \
@@ -5222,6 +5248,9 @@ lib_LTLIBRARIES += \
        libnss_mymachines.la
 
 if HAVE_LIBCURL
+if HAVE_XZ
+if HAVE_ZLIB
+if HAVE_GCRYPT
 
 bin_PROGRAMS += \
        systemd-import
@@ -5230,8 +5259,14 @@ systemd_import_SOURCES = \
        src/import/import.c \
        src/import/import-raw.c \
        src/import/import-raw.h \
+       src/import/import-tar.c \
+       src/import/import-tar.h \
        src/import/import-dkr.c \
        src/import/import-dkr.h \
+       src/import/import-job.c \
+       src/import/import-job.h \
+       src/import/import-util.c \
+       src/import/import-util.h \
        src/import/curl-util.c \
        src/import/curl-util.h \
        src/import/aufs-util.c \
@@ -5243,7 +5278,10 @@ systemd_import_CFLAGS = \
        $(AM_CFLAGS) \
        $(LIBCURL_CFLAGS) \
        $(XZ_CFLAGS) \
-       $(ZLIB_CFLAGS)
+       $(ZLIB_CFLAGS) \
+       $(GCRYPT_CFLAGS) \
+       -D VENDOR_KEYRING_PATH=\"$(rootlibexecdir)/import-pubring.gpg\" \
+       -D USER_KEYRING_PATH=\"$(pkgsysconfdir)/import-pubring.gpg\"
 
 systemd_import_LDADD = \
        libsystemd-internal.la \
@@ -5251,11 +5289,9 @@ systemd_import_LDADD = \
        libsystemd-shared.la \
        $(LIBCURL_LIBS) \
        $(XZ_LIBS) \
-       $(ZLIB_LIBS)
-
-endif
+       $(ZLIB_LIBS) \
+       $(GCRYPT_LIBS)
 
-if HAVE_ZLIB
 manual_tests += \
        test-qcow2
 
@@ -5270,8 +5306,15 @@ test_qcow2_CFLAGS = \
 
 test_qcow2_LDADD = \
        libsystemd-internal.la \
+       libsystemd-label.la \
        libsystemd-shared.la \
        $(ZLIB_LIBS)
+
+dist_rootlibexec_DATA = \
+       src/import/import-pubring.gpg
+endif
+endif
+endif
 endif
 
 endif
@@ -5465,6 +5508,7 @@ libsystemd_networkd_core_la_SOURCES = \
        src/network/networkd-netdev-vxlan.h \
        src/network/networkd-netdev-vlan.h \
        src/network/networkd-netdev-macvlan.h \
+       src/network/networkd-netdev-ipvlan.h \
        src/network/networkd-netdev-dummy.h \
        src/network/networkd-netdev-tuntap.h \
        src/network/networkd-netdev-bond.h \
@@ -5475,6 +5519,7 @@ libsystemd_networkd_core_la_SOURCES = \
        src/network/networkd-netdev-vxlan.c \
        src/network/networkd-netdev-vlan.c \
        src/network/networkd-netdev-macvlan.c \
+       src/network/networkd-netdev-ipvlan.c \
        src/network/networkd-netdev-dummy.c \
        src/network/networkd-netdev-tuntap.c \
        src/network/networkd-netdev-bond.c \
@@ -6632,3 +6677,9 @@ git-contrib:
 
 EXTRA_DIST += \
         tools/gdb-sd_dump_hashmaps.py
+
+list-keys:
+       gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --list-keys
+
+add-key:
+       gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --import -