diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-10-26 08:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-10-26 08:29:10 +0000 |
commit | 66ae4baad173098544603718e9864f0da1c0c7a3 (patch) | |
tree | d8e6f387ee9b4d9b6936e3c21208e50b86daea60 /CMakeLists.txt | |
parent | Adding upstream version 1.18.0. (diff) | |
download | netdata-66ae4baad173098544603718e9864f0da1c0c7a3.tar.xz netdata-66ae4baad173098544603718e9864f0da1c0c7a3.zip |
Adding upstream version 1.18.1.upstream/1.18.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 75a5427a..857f5b9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -302,6 +302,7 @@ set(LIBNETDATA_FILES libnetdata/inlined.h libnetdata/libnetdata.c libnetdata/libnetdata.h + libnetdata/required_dummies.h libnetdata/locks/locks.c libnetdata/locks/locks.h libnetdata/log/log.c @@ -876,3 +877,25 @@ IF(ENABLE_PLUGIN_CGROUP_NETWORK) ELSE() message(STATUS "cgroup-network: disabled (requires Linux)") ENDIF() + + +# ----------------------------------------------------------------------------- +# Unit tests + +if(UNIT_TESTING) + message(STATUS "Looking for CMocka which is required for unit testing") + find_package(CMocka REQUIRED) + include(CTest) + +if(BUILD_TESTING) + add_executable(str2ld_testdriver libnetdata/tests/test_str2ld.c) + target_link_libraries(str2ld_testdriver libnetdata ${NETDATA_COMMON_LIBRARIES} ${CMOCKA_LIBRARIES}) + add_test(NAME test_str2ld COMMAND str2ld_testdriver) + + add_executable(storage_number_testdriver libnetdata/storage_number/tests/test_storage_number.c) + target_link_libraries(storage_number_testdriver libnetdata ${NETDATA_COMMON_LIBRARIES} ${CMOCKA_LIBRARIES}) + add_test(NAME test_storage_number COMMAND storage_number_testdriver) + + set_target_properties(str2ld_testdriver storage_number_testdriver PROPERTIES RUNTIME_OUTPUT_DIRECTORY tests) +endif() +endif() |