CMakeLists.txt 3.5 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
    ${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
15
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/tar/util_gzip.c
L
lifeng68 已提交
16 17 18
    ${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 已提交
19 20
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/common/err_msg.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/common/sysinfo.c
L
lifeng68 已提交
21
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/cmd/command_parser.c
L
lifeng68 已提交
22
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/config/daemon_arguments.c
J
jikui 已提交
23
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../test/image/oci/oci_ut_common.cpp
J
jingrui 已提交
24 25 26 27 28
    ${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 已提交
29
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/modules/runtime/isula/isula_rt_ops.c
J
jikui 已提交
30
    isula_rt_ops_ut.cpp)
J
jingrui 已提交
31 32 33 34

target_include_directories(${EXE} PUBLIC
    ${GTEST_INCLUDE_DIR}
    ${CMAKE_CURRENT_SOURCE_DIR}/../../include
L
lifeng68 已提交
35
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils
L
lifeng68 已提交
36
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/common
L
lifeng68 已提交
37
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/map
38
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/tar
39
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/modules/api
L
lifeng68 已提交
40
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/services/execution/manager
L
lifeng68 已提交
41 42 43 44 45
    ${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 已提交
46
    ${CMAKE_BINARY_DIR}/conf
L
lifeng68 已提交
47
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/sha256
J
jingrui 已提交
48 49
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/config
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/cmd
L
lifeng68 已提交
50
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/config
L
lifeng68 已提交
51
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/common
L
lifeng68 已提交
52 53 54
    ${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 已提交
55
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/console
J
jingrui 已提交
56 57 58
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../test/mocks
    )

L
lifeng68 已提交
59
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 已提交
60
add_test(NAME ${EXE} COMMAND ${EXE})