diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 13:39:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 13:39:28 +0000 |
commit | 7332b914bff2786ff70ccace103fc9ebdfb61a23 (patch) | |
tree | 3a8a60c4edba014c7e350be41839e3edbf2a315f /mk/unittest.mk | |
parent | Adding debian version 2.1.7-1. (diff) | |
download | pacemaker-7332b914bff2786ff70ccace103fc9ebdfb61a23.tar.xz pacemaker-7332b914bff2786ff70ccace103fc9ebdfb61a23.zip |
Merging upstream version 2.1.8~rc1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mk/unittest.mk')
-rw-r--r-- | mk/unittest.mk | 15 |
1 files changed, 12 insertions, 3 deletions
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 |