Add the command-line argument '--output-config' for generating configuration in test cases that increase the compatibility of message types and error codes
This commit is contained in:
parent
26c9b757de
commit
c25b6f1efe
|
@ -41,23 +41,23 @@ add_test(
|
|||
)
|
||||
|
||||
if (${TD_LINUX})
|
||||
# tmsg test
|
||||
add_executable(tmsgTest "")
|
||||
target_sources(tmsgTest
|
||||
PRIVATE
|
||||
"tmsgTest.cpp"
|
||||
"../src/tmsg.c"
|
||||
)
|
||||
target_include_directories(tmsgTest PUBLIC "${TD_SOURCE_DIR}/include/common/")
|
||||
target_link_libraries(tmsgTest PUBLIC os util gtest gtest_main)
|
||||
add_test(
|
||||
NAME tmsgTest
|
||||
COMMAND tmsgTest
|
||||
)
|
||||
# tmsg test
|
||||
add_executable(tmsgTest "")
|
||||
target_sources(tmsgTest
|
||||
PRIVATE
|
||||
"tmsgTest.cpp"
|
||||
"../src/tmsg.c"
|
||||
)
|
||||
target_include_directories(tmsgTest PUBLIC "${TD_SOURCE_DIR}/include/common/")
|
||||
target_link_libraries(tmsgTest PUBLIC os util gtest gtest_main)
|
||||
add_test(
|
||||
NAME tmsgTest
|
||||
COMMAND tmsgTest
|
||||
)
|
||||
|
||||
# config file for msg type table
|
||||
SET(MSG_TBL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/msgTypeTable.ini)
|
||||
add_custom_command(TARGET tmsgTest POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${MSG_TBL_FILE} $<TARGET_FILE_DIR:tmsgTest>
|
||||
)
|
||||
# config file for msg type table
|
||||
SET(MSG_TBL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/msgTypeTable.ini)
|
||||
add_custom_command(TARGET tmsgTest POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${MSG_TBL_FILE} $<TARGET_FILE_DIR:tmsgTest>
|
||||
)
|
||||
endif ()
|
|
@ -127,17 +127,17 @@ add_test(
|
|||
#)
|
||||
|
||||
if (${TD_LINUX})
|
||||
# terrorTest
|
||||
add_executable(terrorTest "terrorTest.cpp")
|
||||
# terrorTest
|
||||
add_executable(terrorTest "terrorTest.cpp")
|
||||
target_link_libraries(terrorTest os util common gtest_main)
|
||||
add_test(
|
||||
NAME terrorTest
|
||||
COMMAND terrorTest
|
||||
)
|
||||
add_test(
|
||||
NAME terrorTest
|
||||
COMMAND terrorTest
|
||||
)
|
||||
|
||||
# config
|
||||
# config
|
||||
SET(ERR_TBL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/errorCodeTable.ini)
|
||||
add_custom_command(TARGET terrorTest POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ERR_TBL_FILE} $<TARGET_FILE_DIR:terrorTest>
|
||||
)
|
||||
add_custom_command(TARGET terrorTest POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ERR_TBL_FILE} $<TARGET_FILE_DIR:terrorTest>
|
||||
)
|
||||
endif ()
|
Loading…
Reference in New Issue