diff options
author | Petr Štetiar <ynezz@true.cz> | 2019-11-19 16:31:44 +0300 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-11-24 15:26:58 +0300 |
commit | b0a5cd8a28bf1d1883317ceac6cb8967d840d6ae (patch) | |
tree | 8600f4d551a16671af14f1d086014b111316ea10 /tests/CMakeLists.txt | |
parent | 1fefb7c4d7f90464940143c93e1b98f44ecf6590 (diff) |
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>
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..1c44825 --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,13 @@ +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) |