diff --git a/src/include/rules.h b/src/include/rules.h index 6ebb37e804..ec3d22d7d1 100644 --- a/src/include/rules.h +++ b/src/include/rules.h @@ -3,6 +3,12 @@ #ifndef _RULES_H #define _RULES_H +#if defined(__TEST__) +#define ENV_TEST 1 +#else +#define ENV_TEST 0 +#endif + #if defined(__TIMELESS__) #define ENV_TIMELESS 1 #else 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)