Skip to content

Commit 0095da7

Browse files
committed
dgb: wire M3 RPC guard tests into ctest + CI allowlist
Register the three standalone M3 regression guards (rpc_request_test / softfork_check_test / genesis_check_test) as ctest targets in src/impl/dgb/test/CMakeLists.txt and add them to BOTH build.yml --target allowlists. Header-only: each links only GTest + nlohmann_json (no OBJECT lib), so they stay buildable while the external-daemon transport rpc.cpp wiring remains deferred (Option-B). Avoids the #143 NOT_BUILT trap: a gtest target present in CMake but absent from the build.yml allowlist becomes a NOT_BUILT sentinel that reds master. Both lists, always. 23/23 guard assertions pass (rpc-request 8, softfork 8, genesis 7).
1 parent 29a0ce8 commit 0095da7

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ jobs:
6868
test_mweb_builder \
6969
test_address_resolution test_compute_share_target \
7070
test_utxo test_dgb_subsidy dgb_share_test \
71+
rpc_request_test softfork_check_test genesis_check_test \
7172
v37_test \
7273
-j$(nproc)
7374
@@ -195,6 +196,7 @@ jobs:
195196
test_mweb_builder \
196197
test_address_resolution test_compute_share_target \
197198
test_utxo test_dgb_subsidy dgb_share_test \
199+
rpc_request_test softfork_check_test genesis_check_test \
198200
test_coin_broadcaster test_multiaddress_pplns test_pplns_stress \
199201
v37_test \
200202
-j$(nproc)

src/impl/dgb/test/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,19 @@ if (BUILD_TESTING AND GTest_FOUND)
1616
include(GoogleTest)
1717
include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
1818
gtest_add_tests(dgb_share_test "" AUTO)
19+
20+
# --- M3 RPC-transport standalone regression guards ---------------------
21+
# Header-only guards over the external-daemon RPC coin-layer SSOTs
22+
# (rpc_request.hpp request-shape + version floor + genesis identity, and
23+
# softfork_check.hpp softfork-name collection). They link no OBJECT lib —
24+
# only GTest + nlohmann_json — so they stay buildable even while the
25+
# transport rpc.cpp wiring is deferred (Option-B scope). Each MUST appear
26+
# in BOTH this ctest registration AND the build.yml --target allowlist,
27+
# or it becomes a #143-style NOT_BUILT sentinel that reds master.
28+
foreach(dgb_guard rpc_request_test softfork_check_test genesis_check_test)
29+
add_executable(${dgb_guard} ${dgb_guard}.cpp)
30+
target_link_libraries(${dgb_guard} PRIVATE
31+
GTest::gtest_main GTest::gtest nlohmann_json::nlohmann_json)
32+
gtest_add_tests(${dgb_guard} "" AUTO)
33+
endforeach()
1934
endif()

0 commit comments

Comments
 (0)