From 924f5ea83e48277e014ebf0d19a27187cb93e2f7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 3 Jun 2024 15:39:28 +0200 Subject: Adding upstream version 2.1.8~rc1. Signed-off-by: Daniel Baumann --- mk/tap.mk | 17 ++++++++++------- mk/unittest.mk | 15 ++++++++++++--- 2 files changed, 22 insertions(+), 10 deletions(-) (limited to 'mk') diff --git a/mk/tap.mk b/mk/tap.mk index fd6d4e2..e06f9a8 100644 --- a/mk/tap.mk +++ b/mk/tap.mk @@ -1,5 +1,5 @@ # -# Copyright 2021-2023 the Pacemaker project contributors +# Copyright 2021-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # @@ -7,15 +7,18 @@ # or later (GPLv2+) WITHOUT ANY WARRANTY. # -AM_TESTS_ENVIRONMENT= \ - G_DEBUG=gc-friendly \ - MALLOC_CHECK_=2 \ - MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) +AM_TESTS_ENVIRONMENT = G_DEBUG=gc-friendly +AM_TESTS_ENVIRONMENT += MALLOC_CHECK_=2 +AM_TESTS_ENVIRONMENT += MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) +AM_TESTS_ENVIRONMENT += PCMK_CTS_CLI_DIR=$(top_srcdir)/cts/cli +AM_TESTS_ENVIRONMENT += PCMK_schema_directory=$(top_builddir)/xml + LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/tests/tap-driver.sh LOG_COMPILER = $(top_srcdir)/tests/tap-test CLEANFILES = *.log *.trs -WRAPPED = calloc \ +WRAPPED = abort \ + calloc \ endgrent \ fopen \ getenv \ @@ -23,10 +26,10 @@ WRAPPED = calloc \ getgrent \ getpwnam_r \ readlink \ + realloc \ setenv \ setgrent \ strdup \ - uname \ unsetenv if WRAPPABLE_FOPEN64 diff --git a/mk/unittest.mk b/mk/unittest.mk index ea397f2..f563ea3 100644 --- a/mk/unittest.mk +++ b/mk/unittest.mk @@ -1,5 +1,5 @@ # -# Copyright 2022 the Pacemaker project contributors +# Copyright 2022-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # @@ -12,8 +12,17 @@ AM_CPPFLAGS = -I$(top_builddir)/include \ -I$(top_srcdir)/lib/common AM_CFLAGS = -DPCMK__UNIT_TESTING +# Add -fno-builtin and -fno-inline to allow mocking realloc. +AM_CFLAGS += -fno-builtin +AM_CFLAGS += -fno-inline AM_LDFLAGS = $(LDFLAGS_WRAP) -LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la \ - -lcmocka +LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la +if BUILD_COVERAGE +LDADD += -lgcov +endif +LDADD += -lcmocka +# When -fno-builtin is used, -lm also needs to be added. See the comments in +# lib/common/Makefile.am for libcrmcommon_test_la_CFLAGS. +LDADD += -lm -- cgit v1.2.3