Commit 85e58f2
committed
ci(test): hoist include(GoogleTest) before first gtest_discover_tests (PRE_TEST exit-8 fix)
The plain Linux x86_64 and AsAN+UBSan lanes failed at ctest with exit 8:
CMake Error at build_*/test/test_dgb_subsidy[1]_include.cmake:6
Unknown CMake command "gtest_discover_tests_impl".
preceded by "include() given empty file name (ignored)".
include(GoogleTest) sets _GOOGLETEST_DISCOVER_TESTS_SCRIPT (the path to
GoogleTestAddTests.cmake). It was at line ~176, AFTER the first three
gtest_discover_tests() calls (test_dgb_subsidy/coinbase_value/utxo, all
DISCOVERY_MODE PRE_TEST). In PRE_TEST the generated <tgt>[1]_include.cmake
includes that script at ctest time to define gtest_discover_tests_impl; with
the var unset the include path was empty and ctest aborted.
The clean-build-dir step (8d05ef2) removed the cached _tests.cmake that had
masked the broken else-branch, surfacing it on the first PRE_TEST target.
Fix: hoist include(GoogleTest) to the top of the BUILD_TESTING block.1 parent 7705a58 commit 85e58f2
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
2 | 11 | | |
3 | 12 | | |
4 | 13 | | |
| |||
0 commit comments