Refactor test suites and strengthen cpp test assertions
This commit is contained in:
parent
b6d598a119
commit
a242c3f2f2
|
|
@ -1,16 +1,30 @@
|
|||
add_executable(TestLiberty TestLiberty.cc)
|
||||
target_link_libraries(TestLiberty
|
||||
OpenSTA
|
||||
GTest::gtest
|
||||
GTest::gtest_main
|
||||
${TCL_LIBRARY}
|
||||
)
|
||||
target_include_directories(TestLiberty PRIVATE
|
||||
${STA_HOME}/include/sta
|
||||
${STA_HOME}
|
||||
${CMAKE_BINARY_DIR}/include/sta
|
||||
)
|
||||
gtest_discover_tests(TestLiberty
|
||||
WORKING_DIRECTORY ${STA_HOME}
|
||||
PROPERTIES LABELS "cpp;module_liberty"
|
||||
macro(sta_cpp_test name)
|
||||
add_executable(${name} ${name}.cc)
|
||||
target_link_libraries(${name}
|
||||
OpenSTA
|
||||
GTest::gtest
|
||||
GTest::gtest_main
|
||||
${TCL_LIBRARY}
|
||||
)
|
||||
target_include_directories(${name} PRIVATE
|
||||
${STA_HOME}/include/sta
|
||||
${STA_HOME}
|
||||
${CMAKE_BINARY_DIR}/include/sta
|
||||
)
|
||||
gtest_discover_tests(${name}
|
||||
WORKING_DIRECTORY ${STA_HOME}
|
||||
PROPERTIES LABELS "cpp;module_liberty"
|
||||
)
|
||||
endmacro()
|
||||
|
||||
sta_cpp_test(TestLibertyClasses)
|
||||
sta_cpp_test(TestLibertyStaBasics)
|
||||
sta_cpp_test(TestLibertyStaCallbacks)
|
||||
|
||||
# Compatibility aggregate target for legacy scripts that still build TestLiberty.
|
||||
add_custom_target(TestLiberty
|
||||
DEPENDS
|
||||
TestLibertyClasses
|
||||
TestLibertyStaBasics
|
||||
TestLibertyStaCallbacks
|
||||
)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,33 +1,34 @@
|
|||
add_executable(TestSearch TestSearch.cc)
|
||||
target_link_libraries(TestSearch
|
||||
OpenSTA
|
||||
GTest::gtest
|
||||
GTest::gtest_main
|
||||
${TCL_LIBRARY}
|
||||
)
|
||||
target_include_directories(TestSearch PRIVATE
|
||||
${STA_HOME}/include/sta
|
||||
${STA_HOME}
|
||||
${CMAKE_BINARY_DIR}/include/sta
|
||||
)
|
||||
gtest_discover_tests(TestSearch
|
||||
WORKING_DIRECTORY ${STA_HOME}
|
||||
PROPERTIES LABELS "cpp;module_search"
|
||||
)
|
||||
macro(sta_cpp_test name)
|
||||
add_executable(${name} ${name}.cc)
|
||||
target_link_libraries(${name}
|
||||
OpenSTA
|
||||
GTest::gtest
|
||||
GTest::gtest_main
|
||||
${TCL_LIBRARY}
|
||||
)
|
||||
target_include_directories(${name} PRIVATE
|
||||
${STA_HOME}/include/sta
|
||||
${STA_HOME}
|
||||
${CMAKE_BINARY_DIR}/include/sta
|
||||
)
|
||||
gtest_discover_tests(${name}
|
||||
WORKING_DIRECTORY ${STA_HOME}
|
||||
PROPERTIES LABELS "cpp;module_search"
|
||||
)
|
||||
endmacro()
|
||||
|
||||
add_executable(TestSearchIncremental TestSearchIncremental.cc)
|
||||
target_link_libraries(TestSearchIncremental
|
||||
OpenSTA
|
||||
GTest::gtest
|
||||
GTest::gtest_main
|
||||
${TCL_LIBRARY}
|
||||
)
|
||||
target_include_directories(TestSearchIncremental PRIVATE
|
||||
${STA_HOME}/include/sta
|
||||
${STA_HOME}
|
||||
${CMAKE_BINARY_DIR}/include/sta
|
||||
)
|
||||
gtest_discover_tests(TestSearchIncremental
|
||||
WORKING_DIRECTORY ${STA_HOME}
|
||||
PROPERTIES LABELS "cpp;module_search"
|
||||
sta_cpp_test(TestSearchClasses)
|
||||
sta_cpp_test(TestSearchStaInit)
|
||||
sta_cpp_test(TestSearchStaInitB)
|
||||
sta_cpp_test(TestSearchStaDesign)
|
||||
sta_cpp_test(TestSearchIncremental)
|
||||
|
||||
# Compatibility aggregate target for legacy scripts that still build TestSearch.
|
||||
add_custom_target(TestSearch
|
||||
DEPENDS
|
||||
TestSearchClasses
|
||||
TestSearchStaInit
|
||||
TestSearchStaInitB
|
||||
TestSearchStaDesign
|
||||
TestSearchIncremental
|
||||
)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue