diff options
Diffstat (limited to 'test/Makefile')
-rw-r--r-- | test/Makefile | 869 |
1 files changed, 849 insertions, 20 deletions
diff --git a/test/Makefile b/test/Makefile index 987a32548f..1d826c0bcd 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,20 +1,849 @@ -# Just a little hook script to easy building when in this directory -.PHONY: all check clean - -all: - $(MAKE) -C .. - -clean: - @for i in TEST-[0-9]*; do \ - [ -d $$i ] || continue ; \ - [ -f $$i/Makefile ] || continue ; \ - make -C $$i clean ; \ - done - -check: - $(MAKE) -C .. all - @for i in TEST-[0-9]*; do \ - [ -d $$i ] || continue ; \ - [ -f $$i/Makefile ] || continue ; \ - make -C $$i all ; \ - done +# -*- Mode: makefile; indent-tabs-mode: t -*- +# +# This file is part of systemd. +# +# Copyright 2010-2012 Lennart Poettering +# Copyright 2010-2012 Kay Sievers +# Copyright 2013 Zbigniew Jędrzejewski-Szmek +# Copyright 2013 David Strauss +# Copyright 2016 Luke Shumaker +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# systemd is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with systemd; If not, see <http://www.gnu.org/licenses/>. +include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk +include $(topsrcdir)/build-aux/Makefile.head.mk + + +manual_tests += \ + test-ns \ + test-loopback \ + test-hostname \ + test-daemon \ + test-cgroup \ + test-install \ + test-watchdog \ + test-log \ + test-ipcrm \ + test-btrfs \ + test-acd \ + test-ipv4ll-manual \ + test-ask-password-api + +ifneq ($(HAVE_LIBIPTC),) +manual_tests += \ + test-firewall-util +endif + +ifneq ($(HAVE_KMOD),) +manual_tests += \ + test-netlink-manual +endif + +tests += \ + test-engine \ + test-cgroup-mask \ + test-job-type \ + test-env-replace \ + test-strbuf \ + test-strv \ + test-path \ + test-path-util \ + test-strxcpyx \ + test-siphash24 \ + test-unit-name \ + test-unit-file \ + test-utf8 \ + test-ellipsize \ + test-util \ + test-string-util \ + test-extract-word \ + test-parse-util \ + test-user-util \ + test-hostname-util \ + test-process-util \ + test-terminal-util \ + test-path-lookup \ + test-barrier \ + test-tmpfiles \ + test-namespace \ + test-date \ + test-sleep \ + test-replace-var \ + test-sched-prio \ + test-calendarspec \ + test-strip-tab-ansi \ + test-cgroup-util \ + test-fstab-util \ + test-prioq \ + test-fileio \ + test-time \ + test-hashmap \ + test-set \ + test-bitmap \ + test-list \ + test-unaligned \ + test-tables \ + test-device-nodes \ + test-xml \ + test-json \ + test-architecture \ + test-socket-util \ + test-fdset \ + test-conf-files \ + test-conf-parser \ + test-capability \ + test-async \ + test-ratelimit \ + test-condition \ + test-uid-range \ + test-bus-policy \ + test-locale-util \ + test-execute \ + test-copy \ + test-cap-list \ + test-sigbus \ + test-rbtree \ + test-verbs \ + test-af-list \ + test-arphrd-list \ + test-dns-domain \ + test-resolve-tables \ + test-install-root \ + test-rlimit-util \ + test-signal-util + +ifneq ($(HAVE_ACL),) +tests += \ + test-acl-util +endif + +EXTRA_DIST += \ + test/a.service \ + test/basic.target \ + test/b.service \ + test/c.service \ + test/daughter.service \ + test/d.service \ + test/end.service \ + test/e.service \ + test/f.service \ + test/grandchild.service \ + test/g.service \ + test/hello-after-sleep.target \ + test/hello.service \ + test/h.service \ + test/parent-deep.slice \ + test/parent.slice \ + test/sched_idle_bad.service \ + test/sched_idle_ok.service \ + test/sched_rr_bad.service \ + test/sched_rr_change.service \ + test/sched_rr_ok.service \ + test/shutdown.target \ + test/sleep.service \ + test/sockets.target \ + test/son.service \ + test/sysinit.target \ + test/testsuite.target \ + test/timers.target \ + test/unstoppable.service \ + test/test-path/paths.target \ + test/test-path/basic.target \ + test/test-path/sysinit.target \ + test/test-path/path-changed.service \ + test/test-path/path-directorynotempty.service \ + test/test-path/path-existsglob.service \ + test/test-path/path-exists.service \ + test/test-path/path-makedirectory.service \ + test/test-path/path-modified.service \ + test/test-path/path-mycustomunit.service \ + test/test-path/path-service.service \ + test/test-path/path-changed.path \ + test/test-path/path-directorynotempty.path \ + test/test-path/path-existsglob.path \ + test/test-path/path-exists.path \ + test/test-path/path-makedirectory.path \ + test/test-path/path-modified.path \ + test/test-path/path-unit.path \ + test/test-execute/exec-environment-empty.service \ + test/test-execute/exec-environment-multiple.service \ + test/test-execute/exec-environment.service \ + test/test-execute/exec-passenvironment-absent.service \ + test/test-execute/exec-passenvironment-empty.service \ + test/test-execute/exec-passenvironment-repeated.service \ + test/test-execute/exec-passenvironment.service \ + test/test-execute/exec-group.service \ + test/test-execute/exec-ignoresigpipe-no.service \ + test/test-execute/exec-ignoresigpipe-yes.service \ + test/test-execute/exec-personality-x86-64.service \ + test/test-execute/exec-personality-x86.service \ + test/test-execute/exec-personality-s390.service \ + test/test-execute/exec-privatedevices-no.service \ + test/test-execute/exec-privatedevices-yes.service \ + test/test-execute/exec-privatetmp-no.service \ + test/test-execute/exec-privatetmp-yes.service \ + test/test-execute/exec-systemcallerrornumber.service \ + test/test-execute/exec-systemcallfilter-failing2.service \ + test/test-execute/exec-systemcallfilter-failing.service \ + test/test-execute/exec-systemcallfilter-not-failing2.service \ + test/test-execute/exec-systemcallfilter-not-failing.service \ + test/test-execute/exec-user.service \ + test/test-execute/exec-workingdirectory.service \ + test/test-execute/exec-umask-0177.service \ + test/test-execute/exec-umask-default.service \ + test/test-execute/exec-privatenetwork-yes.service \ + test/test-execute/exec-environmentfile.service \ + test/test-execute/exec-oomscoreadjust-positive.service \ + test/test-execute/exec-oomscoreadjust-negative.service \ + test/test-execute/exec-ioschedulingclass-best-effort.service \ + test/test-execute/exec-ioschedulingclass-idle.service \ + test/test-execute/exec-ioschedulingclass-none.service \ + test/test-execute/exec-ioschedulingclass-realtime.service \ + test/test-execute/exec-capabilityboundingset-invert.service \ + test/test-execute/exec-capabilityboundingset-merge.service \ + test/test-execute/exec-capabilityboundingset-reset.service \ + test/test-execute/exec-capabilityboundingset-simple.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 + + +EXTRA_DIST += \ + src/test/test-helper.h + +test_device_nodes_SOURCES = \ + src/test/test-device-nodes.c + +test_device_nodes_LDADD = \ + libshared.la + +test_engine_SOURCES = \ + src/test/test-engine.c + +test_engine_CFLAGS = \ + $(AM_CFLAGS) \ + $(SECCOMP_CFLAGS) \ + $(MOUNT_CFLAGS) + +test_engine_LDADD = \ + libcore.la + +test_job_type_SOURCES = \ + src/test/test-job-type.c + +test_job_type_CFLAGS = \ + $(AM_CFLAGS) \ + $(SECCOMP_CFLAGS) \ + $(MOUNT_CFLAGS) + +test_job_type_LDADD = \ + libcore.la + +test_ns_SOURCES = \ + src/test/test-ns.c + +test_ns_CFLAGS = \ + $(AM_CFLAGS) \ + $(SECCOMP_CFLAGS) + +test_ns_LDADD = \ + libcore.la + +test_loopback_SOURCES = \ + src/test/test-loopback.c + +test_loopback_LDADD = \ + libcore.la + +test_hostname_SOURCES = \ + src/test/test-hostname.c + +test_hostname_LDADD = \ + libcore.la + +test_dns_domain_SOURCES = \ + src/test/test-dns-domain.c + +test_dns_domain_LDADD = \ + libsystemd-network.la \ + libshared.la + +test_resolve_tables_SOURCES = \ + src/resolve/test-resolve-tables.c \ + src/shared/test-tables.h \ + src/resolve/dns-type.c \ + src/resolve/dns-type.h \ + src/resolve/dns_type-from-name.h \ + src/resolve/dns_type-to-name.h + +test_resolve_tables_LDADD = \ + libshared.la + +ifneq ($(ENABLE_EFI),) +manual_tests += \ + test-boot-timestamp + +test_boot_timestamp_SOURCES = \ + src/test/test-boot-timestamps.c + +test_boot_timestamp_LDADD = \ + libshared.la +endif + +test_unit_name_SOURCES = \ + src/test/test-unit-name.c + +test_unit_name_CFLAGS = \ + $(AM_CFLAGS) \ + $(SECCOMP_CFLAGS) \ + $(MOUNT_CFLAGS) + +test_unit_name_LDADD = \ + libcore.la + +test_unit_file_SOURCES = \ + src/test/test-unit-file.c + +test_unit_file_CFLAGS = \ + $(AM_CFLAGS) \ + $(SECCOMP_CFLAGS) \ + $(MOUNT_CFLAGS) + +test_unit_file_LDADD = \ + libcore.la + +test_utf8_SOURCES = \ + src/test/test-utf8.c + +test_utf8_LDADD = \ + libshared.la + +test_capability_SOURCES = \ + src/test/test-capability.c + +test_capability_LDADD = \ + libshared.la + +test_async_SOURCES = \ + src/test/test-async.c + +test_async_LDADD = \ + libshared.la + +test_locale_util_SOURCES = \ + src/test/test-locale-util.c + +test_locale_util_LDADD = \ + libshared.la + +test_copy_SOURCES = \ + src/test/test-copy.c + +test_copy_LDADD = \ + libshared.la + +test_sigbus_SOURCES = \ + src/test/test-sigbus.c + +test_sigbus_LDADD = \ + libshared.la + +test_rbtree_SOURCES = \ + src/test/test-rbtree.c + +test_rbtree_LDADD = \ + libshared.la + +test_condition_SOURCES = \ + src/test/test-condition.c + +test_condition_LDADD = \ + libshared.la + +test_fdset_SOURCES = \ + src/test/test-fdset.c + +test_fdset_LDADD = \ + libshared.la + +test_fstab_util_SOURCES = \ + src/test/test-fstab-util.c + +test_fstab_util_LDADD = \ + libshared.la + +test_ratelimit_SOURCES = \ + src/test/test-ratelimit.c + +test_ratelimit_LDADD = \ + libshared.la + +test_util_SOURCES = \ + src/test/test-util.c + +test_util_LDADD = \ + libshared.la + +test_string_util_SOURCES = \ + src/test/test-string-util.c + +test_string_util_LDADD = \ + libshared.la + +test_extract_word_SOURCES = \ + src/test/test-extract-word.c + +test_extract_word_LDADD = \ + libshared.la + +test_parse_util_SOURCES = \ + src/test/test-parse-util.c + +test_parse_util_LDADD = \ + libshared.la + +test_user_util_SOURCES = \ + src/test/test-user-util.c + +test_user_util_LDADD = \ + libshared.la + +test_hostname_util_SOURCES = \ + src/test/test-hostname-util.c + +test_hostname_util_LDADD = \ + libshared.la + +test_process_util_SOURCES = \ + src/test/test-process-util.c + +test_process_util_LDADD = \ + libshared.la + +test_terminal_util_SOURCES = \ + src/test/test-terminal-util.c + +test_terminal_util_LDADD = \ + libshared.la + +test_path_lookup_SOURCES = \ + src/test/test-path-lookup.c + +test_path_lookup_LDADD = \ + libshared.la + +test_uid_range_SOURCES = \ + src/test/test-uid-range.c + +test_uid_range_LDADD = \ + libshared.la + +test_cap_list_SOURCES = \ + src/test/test-cap-list.c + +test_cap_list_LDADD = \ + libshared.la + +test_socket_util_SOURCES = \ + src/test/test-socket-util.c + +test_socket_util_LDADD = \ + libshared.la + +test_barrier_SOURCES = \ + src/test/test-barrier.c + +test_barrier_LDADD = \ + libshared.la + +test_tmpfiles_SOURCES = \ + src/test/test-tmpfiles.c + +test_tmpfiles_LDADD = \ + libshared.la + +test_namespace_SOURCES = \ + src/test/test-namespace.c + +test_verbs_SOURCES = \ + src/test/test-verbs.c + +test_verbs_LDADD = \ + libshared.la + +test_install_root_SOURCES = \ + src/test/test-install-root.c + +test_install_root_LDADD = \ + libshared.la + +test_acl_util_SOURCES = \ + src/test/test-acl-util.c + +test_acl_util_LDADD = \ + libshared.la + +test_namespace_LDADD = \ + libcore.la + +test_rlimit_util_SOURCES = \ + src/test/test-rlimit-util.c + +test_rlimit_util_LDADD = \ + libshared.la + +test_ask_password_api_SOURCES = \ + src/test/test-ask-password-api.c + +test_ask_password_api_LDADD = \ + libshared.la + +test_signal_util_SOURCES = \ + src/test/test-signal-util.c + +test_signal_util_LDADD = \ + libshared.la + +BUILT_SOURCES += \ + src/test/test-hashmap-ordered.c + +src/test/test-hashmap-ordered.c: src/test/test-hashmap-plain.c + $(AM_V_at)$(MKDIR_P) $(dir $@) + $(AM_V_GEN)$(AWK) 'BEGIN { print "/* GENERATED FILE */\n#define ORDERED" } \ + { if (!match($$0, "^#include")) \ + gsub(/hashmap/, "ordered_hashmap"); \ + gsub(/HASHMAP/, "ORDERED_HASHMAP"); \ + gsub(/Hashmap/, "OrderedHashmap"); \ + print }' <$< >$@ + +nodist_test_hashmap_SOURCES = \ + src/test/test-hashmap-ordered.c + +test_hashmap_SOURCES = \ + src/test/test-hashmap.c \ + src/test/test-hashmap-plain.c + +test_hashmap_LDADD = \ + libshared.la + +test_set_SOURCES = \ + src/test/test-set.c + +test_set_LDADD = \ + libshared.la + +test_bitmap_SOURCES = \ + src/test/test-bitmap.c + +test_bitmap_LDADD = \ + libshared.la + +test_xml_SOURCES = \ + src/test/test-xml.c + +test_xml_LDADD = \ + libshared.la + +test_json_SOURCES = \ + src/test/test-json.c + +test_json_LDADD = \ + libshared.la + +test_list_SOURCES = \ + src/test/test-list.c + +test_list_LDADD = \ + libshared.la + +test_unaligned_LDADD = \ + libshared.la + +test_unaligned_SOURCES = \ + src/test/test-unaligned.c + +test_tables_SOURCES = \ + src/test/test-tables.c \ + src/shared/test-tables.h \ + src/bus-proxyd/bus-xml-policy.c \ + src/bus-proxyd/bus-xml-policy.h \ + src/journal/journald-server.c \ + src/journal/journald-server.h + +test_tables_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + -I$(top_srcdir)/src/bus-proxyd + +test_tables_CFLAGS = \ + $(AM_CFLAGS) \ + $(SECCOMP_CFLAGS) \ + $(MOUNT_CFLAGS) + +test_tables_LDADD = \ + libjournal-core.la \ + libcore.la \ + libudev-core.la + +test_prioq_SOURCES = \ + src/test/test-prioq.c + +test_prioq_LDADD = \ + libshared.la + +test_fileio_SOURCES = \ + src/test/test-fileio.c + +test_fileio_LDADD = \ + libshared.la + +test_time_SOURCES = \ + src/test/test-time.c + +test_time_LDADD = \ + libshared.la + +test_architecture_SOURCES = \ + src/test/test-architecture.c + +test_architecture_LDADD = \ + libshared.la + +test_log_SOURCES = \ + src/test/test-log.c + +test_log_LDADD = \ + libshared.la + +test_ipcrm_SOURCES = \ + src/test/test-ipcrm.c + +test_ipcrm_LDADD = \ + libshared.la + +test_btrfs_SOURCES = \ + src/test/test-btrfs.c + +test_btrfs_LDADD = \ + libshared.la + +ifneq ($(HAVE_LIBIPTC),) +test_firewall_util_SOURCES = \ + src/test/test-firewall-util.c + +test_firewall_util_CFLAGS = \ + $(AM_CFLAGS) \ + $(LIBIPTC_CFLAGS) + +test_firewall_util_LDADD = \ + libfirewall.la \ + libshared.la \ + $(LIBIPTC_LIBS) +endif + +test_netlink_manual_SOURCES = \ + src/test/test-netlink-manual.c + +test_netlink_manual_CFLAGS = \ + $(AM_CFLAGS) \ + $(KMOD_CFLAGS) + +test_netlink_manual_LDADD = \ + libshared.la \ + $(KMOD_LIBS) + +test_ellipsize_SOURCES = \ + src/test/test-ellipsize.c + +test_ellipsize_LDADD = \ + libshared.la + +test_date_SOURCES = \ + src/test/test-date.c + +test_date_LDADD = \ + libshared.la + +test_sleep_SOURCES = \ + src/test/test-sleep.c + +test_sleep_LDADD = \ + libcore.la + +test_replace_var_SOURCES = \ + src/test/test-replace-var.c + +test_replace_var_LDADD = \ + libshared.la + +test_calendarspec_SOURCES = \ + src/test/test-calendarspec.c + +test_calendarspec_LDADD = \ + libshared.la + +test_strip_tab_ansi_SOURCES = \ + src/test/test-strip-tab-ansi.c + +test_strip_tab_ansi_LDADD = \ + libshared.la + +test_daemon_SOURCES = \ + src/test/test-daemon.c + +test_daemon_LDADD = \ + libshared.la + +test_cgroup_SOURCES = \ + src/test/test-cgroup.c + +test_cgroup_LDADD = \ + libshared.la + +test_cgroup_mask_SOURCES = \ + src/test/test-cgroup-mask.c + +test_cgroup_mask_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(MOUNT_CFLAGS) + +test_cgroup_mask_CFLAGS = \ + $(AM_CFLAGS) \ + $(SECCOMP_CFLAGS) + +test_cgroup_mask_LDADD = \ + libcore.la + +test_cgroup_util_SOURCES = \ + src/test/test-cgroup-util.c + +test_cgroup_util_LDADD = \ + libshared.la + +test_env_replace_SOURCES = \ + src/test/test-env-replace.c + +test_env_replace_LDADD = \ + libshared.la + +test_strbuf_SOURCES = \ + src/test/test-strbuf.c + +test_strbuf_LDADD = \ + libshared.la + +test_strv_SOURCES = \ + src/test/test-strv.c + +test_strv_LDADD = \ + libshared.la + +test_path_util_SOURCES = \ + src/test/test-path-util.c + +test_path_util_LDADD = \ + libshared.la + +test_path_SOURCES = \ + src/test/test-path.c + +test_path_CFLAGS = \ + $(AM_CFLAGS) \ + $(MOUNT_CFLAGS) + +test_path_LDADD = \ + libcore.la + +test_execute_SOURCES = \ + src/test/test-execute.c + +test_execute_CFLAGS = \ + $(AM_CFLAGS) \ + $(MOUNT_CFLAGS) + +test_execute_LDADD = \ + libcore.la + +test_siphash24_SOURCES = \ + src/test/test-siphash24.c + +test_siphash24_LDADD = \ + libshared.la + +test_strxcpyx_SOURCES = \ + src/test/test-strxcpyx.c + +test_strxcpyx_LDADD = \ + libshared.la + +test_install_SOURCES = \ + src/test/test-install.c + +test_install_LDADD = \ + libshared.la + +test_watchdog_SOURCES = \ + src/test/test-watchdog.c + +test_watchdog_LDADD = \ + libshared.la + +test_sched_prio_SOURCES = \ + src/test/test-sched-prio.c + +test_sched_prio_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(MOUNT_CFLAGS) + +test_sched_prio_CFLAGS = \ + $(AM_CFLAGS) \ + $(SECCOMP_CFLAGS) + +test_sched_prio_LDADD = \ + libcore.la + +test_conf_files_SOURCES = \ + src/test/test-conf-files.c + +test_conf_files_LDADD = \ + libshared.la + +test_conf_parser_SOURCES = \ + src/test/test-conf-parser.c + +test_conf_parser_LDADD = \ + libshared.la + +test_bus_policy_SOURCES = \ + src/bus-proxyd/test-bus-xml-policy.c + +test_bus_policy_LDADD = \ + libbus-proxy-core.la \ + libshared.la + +test_af_list_SOURCES = \ + src/test/test-af-list.c + +test_af_list_LDADD = \ + libbasic.la + +test_arphrd_list_SOURCES = \ + src/test/test-arphrd-list.c + +test_arphrd_list_LDADD = \ + libbasic.la + +include $(topsrcdir)/build-aux/Makefile.tail.mk |