Skip to content

Commit fe86c9e

Browse files
authored
Merge pull request #10867 from The-OpenROAD-Project-staging/fix-gtest-discovery-flake
build: defer gtest discovery to ctest time to fix flaky CI builds
2 parents caa9e80 + 46e58c9 commit fe86c9e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ set(CMAKE_CXX_EXTENSIONS OFF)
7575

7676
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
7777

78-
set_property(DIRECTORY PROPERTY TEST_DISCOVERY_TIMEOUT 60)
78+
# Defer GoogleTest case discovery from build time (POST_BUILD default, which
79+
# execs each test binary during the build) to ctest time. On a loaded CI host
80+
# the build-time discovery run can exceed the timeout and fail the whole build.
81+
set(CMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE PRE_TEST)
7982

8083
# Get version string in OPENROAD_VERSION
8184
if(NOT OPENROAD_VERSION)

0 commit comments

Comments
 (0)