libubox/tests/CMakeLists.txt
Petr Štetiar b0a5cd8a28 add cram based unit tests
For improved QA etc. For the start with initial test cases for avl,
base64, jshn and list components. Moved runqueue and blobmsg from
examples to tests.  Converted just a few first test cases from
json-script example into the new cram based unit test, more to come.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-11-24 13:26:58 +01:00

13 lines
423 B
CMake

ADD_SUBDIRECTORY(cram)
MACRO(ADD_UNIT_TEST name)
ADD_EXECUTABLE(${name} ${name}.c)
TARGET_LINK_LIBRARIES(${name} ubox blobmsg_json json_script ${json})
TARGET_INCLUDE_DIRECTORIES(${name} PRIVATE ${PROJECT_SOURCE_DIR})
ENDMACRO(ADD_UNIT_TEST)
FILE(GLOB test_cases "test-*.c")
FOREACH(test_case ${test_cases})
GET_FILENAME_COMPONENT(test_case ${test_case} NAME_WE)
ADD_UNIT_TEST(${test_case})
ENDFOREACH(test_case)