CMakeLists.txt 3.3 KB
Newer Older
J
jikui 已提交
1
project(iSulad_UT)
J
jingrui 已提交
2

J
jikui 已提交
3
SET(EXE isula_rt_ops_ut)
J
jingrui 已提交
4 5

add_executable(${EXE}
L
lifeng68 已提交
6 7 8 9 10 11 12 13 14 15 16 17
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/utils.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/utils_regex.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/utils_verify.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/utils_array.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/utils_string.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/utils_convert.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/utils_file.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/util_atomic.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/sha256/sha256.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/path.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/map/map.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/map/rb_tree.c
L
lifeng68 已提交
18 19
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/common/err_msg.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/common/sysinfo.c
L
lifeng68 已提交
20
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/cmd/command_parser.c
L
lifeng68 已提交
21
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/config/daemon_arguments.c
J
jikui 已提交
22
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../test/image/oci/oci_ut_common.cpp
J
jingrui 已提交
23 24 25 26 27
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../test/mocks/containers_store_mock.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../test/mocks/namespace_mock.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../test/mocks/container_unix_mock.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../test/mocks/engine_mock.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../test/mocks/isulad_config_mock.cc
L
lifeng68 已提交
28
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/modules/runtime/isula/isula_rt_ops.c
J
jikui 已提交
29
    isula_rt_ops_ut.cpp)
J
jingrui 已提交
30 31 32 33

target_include_directories(${EXE} PUBLIC
    ${GTEST_INCLUDE_DIR}
    ${CMAKE_CURRENT_SOURCE_DIR}/../../include
L
lifeng68 已提交
34
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils
L
lifeng68 已提交
35
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/common
L
lifeng68 已提交
36
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/map
37
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/modules/api
L
lifeng68 已提交
38
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/services/execution/manager
L
lifeng68 已提交
39 40 41 42 43
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/modules/events
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/modules/runtime
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/modules/runtime/isula
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/modules/spec/
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/modules/runtime/engines
J
jingrui 已提交
44
    ${CMAKE_BINARY_DIR}/conf
L
lifeng68 已提交
45
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/sha256
J
jingrui 已提交
46 47
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/config
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/cmd
L
lifeng68 已提交
48
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/config
L
lifeng68 已提交
49
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/common
L
lifeng68 已提交
50 51 52
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/modules/container
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/modules/container/restart_manager
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/modules/container/health_check
L
lifeng68 已提交
53
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/console
J
jingrui 已提交
54 55 56
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../test/mocks
    )

L
lifeng68 已提交
57
target_link_libraries(${EXE} ${GTEST_BOTH_LIBRARIES} ${GMOCK_LIBRARY} ${GMOCK_MAIN_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${ISULA_LIBUTILS_LIBRARY} -lpthread -lgrpc++ -lprotobuf -lcrypto -lyajl -lz)
W
wujing 已提交
58
add_test(NAME ${EXE} COMMAND ${EXE})