From 8699c7dcdc85ca32cd33399717f5b034c7b691df Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 25 Jul 2022 21:17:24 +0200 Subject: [PATCH] ci: protect test.c with #if LV_BUILD_TEST --- tests/makefile/Makefile | 2 +- tests/makefile/test.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/makefile/Makefile b/tests/makefile/Makefile index d3d7dd8ebf..10aa776b61 100644 --- a/tests/makefile/Makefile +++ b/tests/makefile/Makefile @@ -2,7 +2,7 @@ LVGL_PATH := $(CURDIR)/../.. include ../../lvgl.mk CSRCS += test.c -CFLAGS += -DLV_CONF_SKIP=1 -I$(LVGL_PATH)/.. +CFLAGS += -DLV_CONF_SKIP=1 -DLV_BUILD_TEST=1 -I$(LVGL_PATH)/.. COBJS := $(patsubst %.c, %.o, $(CSRCS)) test_file: $(COBJS) diff --git a/tests/makefile/test.c b/tests/makefile/test.c index 6ae11c2f14..36379fdc22 100644 --- a/tests/makefile/test.c +++ b/tests/makefile/test.c @@ -1,3 +1,4 @@ +#if LV_BUILD_TEST #include #include "lvgl/lvgl.h" @@ -6,3 +7,4 @@ int main(void) lv_init(); return 0; } +#endif