mirror of
https://github.com/The-OpenROAD-Project/OpenSTA.git
synced 2026-05-30 00:24:12 +08:00
Refactor test suites and strengthen cpp test assertions
This commit is contained in:
@@ -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
3874
liberty/test/cpp/TestLibertyClasses.cc
Normal file
3874
liberty/test/cpp/TestLibertyClasses.cc
Normal file
File diff suppressed because it is too large
Load Diff
6776
liberty/test/cpp/TestLibertyStaBasics.cc
Normal file
6776
liberty/test/cpp/TestLibertyStaBasics.cc
Normal file
File diff suppressed because it is too large
Load Diff
4118
liberty/test/cpp/TestLibertyStaCallbacks.cc
Normal file
4118
liberty/test/cpp/TestLibertyStaCallbacks.cc
Normal file
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
1825
search/test/cpp/TestSearchClasses.cc
Normal file
1825
search/test/cpp/TestSearchClasses.cc
Normal file
File diff suppressed because it is too large
Load Diff
8771
search/test/cpp/TestSearchStaDesign.cc
Normal file
8771
search/test/cpp/TestSearchStaDesign.cc
Normal file
File diff suppressed because it is too large
Load Diff
4982
search/test/cpp/TestSearchStaInit.cc
Normal file
4982
search/test/cpp/TestSearchStaInit.cc
Normal file
File diff suppressed because it is too large
Load Diff
4962
search/test/cpp/TestSearchStaInitB.cc
Normal file
4962
search/test/cpp/TestSearchStaInitB.cc
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user