diff --git a/lib/common/tests/acl/Makefile.am b/lib/common/tests/acl/Makefile.am index 93aa87a5f6..0fd00fabd8 100644 --- a/lib/common/tests/acl/Makefile.am +++ b/lib/common/tests/acl/Makefile.am @@ -1,26 +1,27 @@ # # Copyright 2021-2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/lib/common LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la +AM_CFLAGS = -DPCMK__UNIT_TESTING AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = \ pcmk__is_user_in_group_test \ pcmk_acl_required_test \ xml_acl_denied_test \ xml_acl_enabled_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/agents/Makefile.am b/lib/common/tests/agents/Makefile.am index 056c8765d9..9249b88946 100644 --- a/lib/common/tests/agents/Makefile.am +++ b/lib/common/tests/agents/Makefile.am @@ -1,21 +1,22 @@ # # Copyright 2020-2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/lib/common LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la -AM_LDFLAGS = +AM_CFLAGS = -DPCMK__UNIT_TESTING +AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk_stonith_param_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/cmdline/Makefile.am b/lib/common/tests/cmdline/Makefile.am index a0a5e58345..a085edc3a7 100644 --- a/lib/common/tests/cmdline/Makefile.am +++ b/lib/common/tests/cmdline/Makefile.am @@ -1,22 +1,23 @@ # # Copyright 2020-2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/lib/common LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la -AM_LDFLAGS = +AM_CFLAGS = -DPCMK__UNIT_TESTING +AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__cmdline_preproc_test \ pcmk__quote_cmdline_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/flags/Makefile.am b/lib/common/tests/flags/Makefile.am index 3f9be62218..6ecb3e1105 100644 --- a/lib/common/tests/flags/Makefile.am +++ b/lib/common/tests/flags/Makefile.am @@ -1,25 +1,26 @@ # # Copyright 2020-2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/lib/common LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la -AM_LDFLAGS = +AM_CFLAGS = -DPCMK__UNIT_TESTING +AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = \ pcmk__clear_flags_as_test \ pcmk__set_flags_as_test \ pcmk_all_flags_set_test \ pcmk_any_flags_set_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/health/Makefile.am b/lib/common/tests/health/Makefile.am index b26bcccd77..6fcb0244e0 100644 --- a/lib/common/tests/health/Makefile.am +++ b/lib/common/tests/health/Makefile.am @@ -1,22 +1,23 @@ # # Copyright 2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/lib/common LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la -AM_LDFLAGS = +AM_CFLAGS = -DPCMK__UNIT_TESTING +AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__parse_health_strategy_test \ pcmk__validate_health_strategy_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/io/Makefile.am b/lib/common/tests/io/Makefile.am index 8b26993c30..16ba9c8717 100644 --- a/lib/common/tests/io/Makefile.am +++ b/lib/common/tests/io/Makefile.am @@ -1,24 +1,24 @@ # # Copyright 2020-2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/lib/common LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la +AM_CFLAGS = -DPCMK__UNIT_TESTING AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = \ pcmk__full_path_test \ pcmk__get_tmpdir_test TESTS = $(check_PROGRAMS) - diff --git a/lib/common/tests/iso8601/Makefile.am b/lib/common/tests/iso8601/Makefile.am index 60bf1959b4..15c046f41e 100644 --- a/lib/common/tests/iso8601/Makefile.am +++ b/lib/common/tests/iso8601/Makefile.am @@ -1,21 +1,22 @@ # # Copyright 2020-2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/lib/common LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la -AM_LDFLAGS = +AM_CFLAGS = -DPCMK__UNIT_TESTING +AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__readable_interval_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/lists/Makefile.am b/lib/common/tests/lists/Makefile.am index 801a9a93db..f7d89672bf 100644 --- a/lib/common/tests/lists/Makefile.am +++ b/lib/common/tests/lists/Makefile.am @@ -1,23 +1,24 @@ # # Copyright 2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/lib/common LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la -AM_LDFLAGS = +AM_CFLAGS = -DPCMK__UNIT_TESTING +AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = \ pcmk__subtract_lists_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/nvpair/Makefile.am b/lib/common/tests/nvpair/Makefile.am index b52d6781ed..5c057b9d5e 100644 --- a/lib/common/tests/nvpair/Makefile.am +++ b/lib/common/tests/nvpair/Makefile.am @@ -1,23 +1,24 @@ # # Copyright 2021-2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/lib/common LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la -AM_LDFLAGS = +AM_CFLAGS = -DPCMK__UNIT_TESTING +AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__xe_attr_is_true_test \ pcmk__xe_get_bool_attr_test \ pcmk__xe_set_bool_attr_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/operations/Makefile.am b/lib/common/tests/operations/Makefile.am index 9f975e474c..96758f7c88 100644 --- a/lib/common/tests/operations/Makefile.am +++ b/lib/common/tests/operations/Makefile.am @@ -1,27 +1,28 @@ # # Copyright 2020-2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/lib/common LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la -AM_LDFLAGS = +AM_CFLAGS = -DPCMK__UNIT_TESTING +AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = copy_in_properties_test \ expand_plus_plus_test \ fix_plus_plus_recursive_test \ parse_op_key_test \ pcmk_is_probe_test \ pcmk_xe_is_probe_test \ pcmk_xe_mask_probe_failure_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/procfs/Makefile.am b/lib/common/tests/procfs/Makefile.am index 2bf936c9d2..c518c2631b 100644 --- a/lib/common/tests/procfs/Makefile.am +++ b/lib/common/tests/procfs/Makefile.am @@ -1,23 +1,24 @@ # # Copyright 2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/lib/common LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la +AM_CFLAGS = -DPCMK__UNIT_TESTING AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__procfs_has_pids_false_test \ pcmk__procfs_has_pids_true_test \ pcmk__procfs_pid2path_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/results/Makefile.am b/lib/common/tests/results/Makefile.am index d77207ecdd..a7332cd65f 100644 --- a/lib/common/tests/results/Makefile.am +++ b/lib/common/tests/results/Makefile.am @@ -1,21 +1,22 @@ # # Copyright 2021-2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/lib/common LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la -AM_LDFLAGS = +AM_CFLAGS = -DPCMK__UNIT_TESTING +AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__results_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/scores/Makefile.am b/lib/common/tests/scores/Makefile.am index b4e24b09a1..0770f9a0c9 100644 --- a/lib/common/tests/scores/Makefile.am +++ b/lib/common/tests/scores/Makefile.am @@ -1,24 +1,25 @@ # # Copyright 2020-2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/lib/common LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la -AM_LDFLAGS = +AM_CFLAGS = -DPCMK__UNIT_TESTING +AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = \ char2score_test \ pcmk__add_scores_test \ pcmk_readable_score_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/strings/Makefile.am b/lib/common/tests/strings/Makefile.am index cb84a123dc..27ea15f1a5 100644 --- a/lib/common/tests/strings/Makefile.am +++ b/lib/common/tests/strings/Makefile.am @@ -1,44 +1,45 @@ # # Copyright 2020-2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/lib/common LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la -AM_LDFLAGS = +AM_CFLAGS = -DPCMK__UNIT_TESTING +AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = \ crm_get_msec_test \ crm_is_true_test \ crm_str_to_boolean_test \ pcmk__add_word_test \ pcmk__btoa_test \ pcmk__char_in_any_str_test \ pcmk__compress_test \ pcmk__ends_with_test \ pcmk__guint_from_hash_test \ pcmk__numeric_strcasecmp_test \ pcmk__parse_ll_range_test \ pcmk__scan_double_test \ pcmk__scan_min_int_test \ pcmk__scan_port_test \ pcmk__starts_with_test \ pcmk__str_any_of_test \ pcmk__str_in_list_test \ pcmk__str_table_dup_test \ pcmk__str_update_test \ pcmk__strcmp_test \ pcmk__strkey_table_test \ pcmk__strikey_table_test \ pcmk__trim_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/utils/Makefile.am b/lib/common/tests/utils/Makefile.am index 7266b0e624..b272886398 100644 --- a/lib/common/tests/utils/Makefile.am +++ b/lib/common/tests/utils/Makefile.am @@ -1,32 +1,33 @@ # # Copyright 2020-2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/lib/common LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la +AM_CFLAGS = -DPCMK__UNIT_TESTING AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = \ compare_version_test \ crm_meta_name_test \ crm_meta_value_test \ crm_user_lookup_test \ pcmk_daemon_user_test \ pcmk_str_is_infinity_test \ pcmk_str_is_minus_infinity_test if WRAPPABLE_UNAME check_PROGRAMS += pcmk_hostname_test endif TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/xpath/Makefile.am b/lib/common/tests/xpath/Makefile.am index 0ee2333607..c7ba319760 100644 --- a/lib/common/tests/xpath/Makefile.am +++ b/lib/common/tests/xpath/Makefile.am @@ -1,21 +1,22 @@ # # Copyright 2021-2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/lib/common LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la -AM_LDFLAGS = +AM_CFLAGS = -DPCMK__UNIT_TESTING +AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__xpath_node_id_test TESTS = $(check_PROGRAMS) diff --git a/lib/pengine/tests/native/Makefile.am b/lib/pengine/tests/native/Makefile.am index 3fb8b40f58..29a31ddd9b 100644 --- a/lib/pengine/tests/native/Makefile.am +++ b/lib/pengine/tests/native/Makefile.am @@ -1,23 +1,24 @@ # # Copyright 2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_builddir) -I$(top_srcdir) LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la \ $(top_builddir)/lib/pengine/libpe_status_test.la \ -lcmocka +AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk AM_TESTS_ENVIRONMENT += PCMK_CTS_CLI_DIR=$(top_srcdir)/cts/cli # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = native_find_rsc_test \ pe_base_name_eq_test TESTS = $(check_PROGRAMS) diff --git a/lib/pengine/tests/rules/Makefile.am b/lib/pengine/tests/rules/Makefile.am index 26ce1e4b2a..e4c33d921f 100644 --- a/lib/pengine/tests/rules/Makefile.am +++ b/lib/pengine/tests/rules/Makefile.am @@ -1,19 +1,20 @@ # # Copyright 2020-2021 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la \ $(top_builddir)/lib/pengine/libpe_rules_test.la \ -lcmocka +AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pe_cron_range_satisfied_test TESTS = $(check_PROGRAMS) diff --git a/lib/pengine/tests/unpack/Makefile.am b/lib/pengine/tests/unpack/Makefile.am index af3be904c1..8699d7565e 100644 --- a/lib/pengine/tests/unpack/Makefile.am +++ b/lib/pengine/tests/unpack/Makefile.am @@ -1,19 +1,20 @@ # # Copyright 2022 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la \ $(top_builddir)/lib/pengine/libpe_status_test.la \ -lcmocka +AM_LDFLAGS = $(LDFLAGS_WRAP) include $(top_srcdir)/mk/tap.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pe_base_name_end_test TESTS = $(check_PROGRAMS)