Skip to content

Commit 3b2b81b

Browse files
etrclaude
andcommitted
CI: fix debug_dump_set Windows skip — keep AUTORUN_TESTS compiled
My earlier Windows skip put AUTORUN_TESTS() inside the #else, so on Windows it was not compiled — but LT_END_AUTO_TEST_ENV() expands to 'return (__lt_result__);' and __lt_result__ is declared by AUTORUN_TESTS(), so the Windows build failed with 'littletest.hpp:46: __lt_result__ was not declared'. Move AUTORUN_TESTS() outside the #if/#else: on Windows it is compiled (declaring __lt_result__) but unreachable after the return 77 skip; the ::setenv opt-in stays in the #else so the undeclared-on-mingw setenv is never compiled there. Matches the working threadsafety_stress skip shape. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NpysYDDJac63yz2mZKKiDf
1 parent 3142868 commit 3b2b81b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/integ/debug_dump_request_body_set_test.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ LT_BEGIN_AUTO_TEST_ENV()
208208
// Opt in BEFORE the test bodies run (and BEFORE the magic-static
209209
// cache in the body pipeline is initialised on first dispatch).
210210
::setenv("LIBHTTPSERVER_DEBUG_DUMP_REQUEST_BODY", "1", 1);
211-
AUTORUN_TESTS()
212211
#endif
212+
// Kept outside the #if/#else so AUTORUN_TESTS() (which declares the
213+
// __lt_result__ that LT_END_AUTO_TEST_ENV returns) is always compiled;
214+
// on Windows it is unreachable after the return 77 above.
215+
AUTORUN_TESTS()
213216
LT_END_AUTO_TEST_ENV()

0 commit comments

Comments
 (0)