From d246e2ca7e7ae4bb04bfec204f20b785dcb3da0a Mon Sep 17 00:00:00 2001 From: Yu-Ping Wu Date: Fri, 9 Jan 2026 17:31:59 +0800 Subject: [PATCH] tests/Makefile.common: Fix inverted USE_SYSTEM_CMOCKA condition "-I$(cmockasrc)/include" should be added to TEST_CFLAGS if we are building cmocka from source (i.e., USE_SYSTEM_CMOCKA is NOT 1). Fix the condition in Makefile.common. Change-Id: I957066fb24f03712a5b4b396aa9e04f3861940ee Signed-off-by: Yu-Ping Wu Reviewed-on: https://review.coreboot.org/c/coreboot/+/90798 Reviewed-by: Hsuan-ting Chen Reviewed-by: Jakub "Kuba" Czapiga Tested-by: build bot (Jenkins) --- tests/Makefile.common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.common b/tests/Makefile.common index a8bb19c4f1..cfb6fe945e 100644 --- a/tests/Makefile.common +++ b/tests/Makefile.common @@ -157,7 +157,7 @@ $($(1)-sysobjs): $(testobj)/$(1)/%.o: $$$$*.c $$($(1)-config-file) # Link against Cmocka if not disabled ifeq ($(strip $(filter-out 0 n no,$($(1)-no_test_framework))),) -ifneq ($(USE_SYSTEM_CMOCKA),) +ifneq ($(USE_SYSTEM_CMOCKA),1) $($(1)-objs): TEST_CFLAGS += -I$(cmockasrc)/include $($(1)-bin): TEST_LDFLAGS += -L$(cmockaobj)/src -Wl,-rpath=$(cmockaobj)/src $($(1)-bin): TEST_CFLAGS += -I$(cmockasrc)/include