ci: protect test.c with #if LV_BUILD_TEST

This commit is contained in:
Gabor Kiss-Vamosi
2022-07-25 21:17:24 +02:00
parent 9024b72b48
commit be485d7605
2 changed files with 3 additions and 1 deletions

View File

@@ -2,7 +2,7 @@ LVGL_DIR := $(CURDIR)/../..
include ../../lvgl.mk
CSRCS += test.c
CFLAGS += -DLV_CONF_SKIP=1 -I$(LVGL_DIR)/..
CFLAGS += -DLV_CONF_SKIP=1 -DLV_BUILD_TEST=1 -I$(LVGL_DIR)/..
COBJS := $(patsubst %.c, %.o, $(CSRCS))
test_file: $(COBJS)

View File

@@ -1,3 +1,4 @@
#if LV_BUILD_TEST
#include <stdio.h>
#include "lvgl/lvgl.h"
@@ -5,3 +6,4 @@ int main(void) {
lv_init();
return 0;
}
#endif