Refactor test suites and strengthen cpp test assertions

This commit is contained in:
Jaehyun Kim 2026-02-23 14:13:29 +09:00
parent b6d598a119
commit a242c3f2f2
11 changed files with 35369 additions and 34891 deletions

View File

@ -1,16 +1,30 @@
add_executable(TestLiberty TestLiberty.cc) macro(sta_cpp_test name)
target_link_libraries(TestLiberty add_executable(${name} ${name}.cc)
OpenSTA target_link_libraries(${name}
GTest::gtest OpenSTA
GTest::gtest_main GTest::gtest
${TCL_LIBRARY} GTest::gtest_main
) ${TCL_LIBRARY}
target_include_directories(TestLiberty PRIVATE )
${STA_HOME}/include/sta target_include_directories(${name} PRIVATE
${STA_HOME} ${STA_HOME}/include/sta
${CMAKE_BINARY_DIR}/include/sta ${STA_HOME}
) ${CMAKE_BINARY_DIR}/include/sta
gtest_discover_tests(TestLiberty )
WORKING_DIRECTORY ${STA_HOME} gtest_discover_tests(${name}
PROPERTIES LABELS "cpp;module_liberty" 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

View File

@ -1,33 +1,34 @@
add_executable(TestSearch TestSearch.cc) macro(sta_cpp_test name)
target_link_libraries(TestSearch add_executable(${name} ${name}.cc)
OpenSTA target_link_libraries(${name}
GTest::gtest OpenSTA
GTest::gtest_main GTest::gtest
${TCL_LIBRARY} GTest::gtest_main
) ${TCL_LIBRARY}
target_include_directories(TestSearch PRIVATE )
${STA_HOME}/include/sta target_include_directories(${name} PRIVATE
${STA_HOME} ${STA_HOME}/include/sta
${CMAKE_BINARY_DIR}/include/sta ${STA_HOME}
) ${CMAKE_BINARY_DIR}/include/sta
gtest_discover_tests(TestSearch )
WORKING_DIRECTORY ${STA_HOME} gtest_discover_tests(${name}
PROPERTIES LABELS "cpp;module_search" WORKING_DIRECTORY ${STA_HOME}
) PROPERTIES LABELS "cpp;module_search"
)
endmacro()
add_executable(TestSearchIncremental TestSearchIncremental.cc) sta_cpp_test(TestSearchClasses)
target_link_libraries(TestSearchIncremental sta_cpp_test(TestSearchStaInit)
OpenSTA sta_cpp_test(TestSearchStaInitB)
GTest::gtest sta_cpp_test(TestSearchStaDesign)
GTest::gtest_main sta_cpp_test(TestSearchIncremental)
${TCL_LIBRARY}
) # Compatibility aggregate target for legacy scripts that still build TestSearch.
target_include_directories(TestSearchIncremental PRIVATE add_custom_target(TestSearch
${STA_HOME}/include/sta DEPENDS
${STA_HOME} TestSearchClasses
${CMAKE_BINARY_DIR}/include/sta TestSearchStaInit
) TestSearchStaInitB
gtest_discover_tests(TestSearchIncremental TestSearchStaDesign
WORKING_DIRECTORY ${STA_HOME} TestSearchIncremental
PROPERTIES LABELS "cpp;module_search"
) )

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