From 084ad93663d113a3c4d5c5b41d50179cb29b2881 Mon Sep 17 00:00:00 2001 From: Jakub Czapiga Date: Thu, 25 Mar 2021 13:10:31 +0100 Subject: include/rules.h: Add ENV_TEST definition Some functions/macros like assert() require redefinition for testing purposes. ENV_TEST is introduced to make it possible without using bypass hacks. This patch also adds a global __TEST__ define to TEST_CFLAGS for all test targets in order to enable ENV_TEST. Signed-off-by: Jakub Czapiga Change-Id: Ib8f2932902a73a7dbe181adc82cc18437abb48e8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/51803 Tested-by: build bot (Jenkins) Reviewed-by: Paul Fagerburg Reviewed-by: Julius Werner --- tests/Makefile.inc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/Makefile.inc b/tests/Makefile.inc index ca974a905a..027091c5e6 100644 --- a/tests/Makefile.inc +++ b/tests/Makefile.inc @@ -39,6 +39,8 @@ TEST_CFLAGS += -I$(dir $(TEST_KCONFIG_AUTOHEADER)) TEST_CFLAGS += -std=gnu11 -Os -ffunction-sections -fdata-sections -fno-builtin +TEST_CFLAGS += -D__TEST__ + # Checkout Cmocka repository forgetthis:=$(shell git submodule update --init --checkout 3rdparty/cmocka) -- cgit v1.2.3