Skip to content

Commit ee73f56

Browse files
committed
Exclude ControlConsoleTest from the Windows test build
ControlConsole's injectInput()/getFd() contract is a non-blocking pipe that TerminalClient::run() selects on; that pipe is only created #ifndef WIN32 (Windows has no select()-compatible anonymous pipe), so getFd() returns -1 there. 3 of the test's 5 cases exercise that pipe directly and fail on Windows as a result. --ctl (ControlConsole's only consumer) is already explicitly unsupported on Windows, so exclude the whole file rather than carry Windows-only branches through it.
1 parent cf2ad0f commit ee73f56

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -623,15 +623,17 @@ if(WIN32)
623623

624624
# These tests exercise production facilities that do not exist on Windows:
625625
# fork/SCM_RIGHTS privilege dropping, Unix server/terminal handlers, a
626-
# POSIX PTY/terminal host, or epoll/kqueue readiness polling. Keep this
627-
# exclusion list explicit so every new portable test is included on
628-
# Windows automatically.
626+
# POSIX PTY/terminal host, epoll/kqueue readiness polling, or the
627+
# POSIX-only `--ctl` control plane (Unix-domain socket, non-blocking pipe).
628+
# Keep this exclusion list explicit so every new portable test is included
629+
# on Windows automatically.
629630
set(WINDOWS_UNSUPPORTED_TEST_SRCS
630631
${CMAKE_CURRENT_SOURCE_DIR}/test/integration_tests/ControlListenerTest.cpp
631632
${CMAKE_CURRENT_SOURCE_DIR}/test/integration_tests/HandleConnectionTimeoutTest.cpp
632633
${CMAKE_CURRENT_SOURCE_DIR}/test/integration_tests/JumphostTest.cpp
633634
${CMAKE_CURRENT_SOURCE_DIR}/test/integration_tests/TerminalServerTest.cpp
634635
${CMAKE_CURRENT_SOURCE_DIR}/test/integration_tests/TerminalTest.cpp
636+
${CMAKE_CURRENT_SOURCE_DIR}/test/unit_tests/ControlConsoleTest.cpp
635637
${CMAKE_CURRENT_SOURCE_DIR}/test/unit_tests/FdPollerTest.cpp
636638
${CMAKE_CURRENT_SOURCE_DIR}/test/unit_tests/HtmGhosttyE2eTest.cpp
637639
${CMAKE_CURRENT_SOURCE_DIR}/test/unit_tests/ServerFifoPathTest.cpp

0 commit comments

Comments
 (0)