build: tests available on FLB_TESTS_RUNTIME and FLB_TESTS_INTERNAL
@@ -37,7 +37,8 @@ option(FLB_WITHOUT_SHARED_LIB "Do not build shared library" No)
option(FLB_STATS "Enable stats support" No)
option(FLB_VALGRIND "Enable Valgrind support" No)
option(FLB_TRACE "Enable trace mode" No)
-option(FLB_TESTS "Enable tests" No)
+option(FLB_TESTS_RUNTIME "Enable runtime tests" No)
+option(FLB_TESTS_INTERNAL "Enabel internal tests" No)
option(FLB_MTRACE "Enable mtrace support" No)
option(FLB_BUFFERING "Enable buffering support" No)
option(FLB_POSIX_TLS "Force POSIX thread storage" No)
@@ -137,6 +138,12 @@ if(FLB_ALL)
set(FLB_OUT_FLOWCOUNTER 1)
endif()
+if(FLB_DEV)
+ set(FLB_DEBUG On)
+ set(FLB_TRACE On)
+ set(FLB_TESTS_INTERNAL On)
+endif()
+
# Macro to set definitions
macro(FLB_DEFINITION var)
add_definitions(-D${var})
@@ -418,9 +425,14 @@ if(NOT FLB_WITHOUT_EXAMPLES)
add_subdirectory(examples)
endif()
-if(FLB_TESTS)
+if(FLB_TESTS_RUNTIME)
+ enable_testing()
+ add_subdirectory(tests/runtime/)
+endif()
+
+if(FLB_TESTS_INTERNAL)
enable_testing()
- add_subdirectory(tests)
+ add_subdirectory(tests/internal/)
endif()
