test(xce-test-cli-ux): build reusable pty-driven black-box CLI harness

clitest_spawn/send_line/send_partial/send_tab/send_signal/wait_for_text/
wait_for_exit/kill_and_reap launch the real compiled xce_test behind a
genuine pty (so isatty/g_interactive/libedit behave as a real terminal),
with stderr routed to a separate pipe for real stream-separation testing.
All waits are poll()-bounded with an explicit timeout so a future
regression can't hang the whole test suite. This is the shared
infrastructure tasks 2.3, 3.5, and all of Validation phase (4.1-4.4)
will build their black-box scenarios on top of. One smoke test proves
launch/send/capture/exit-code/stream-separation end to end.
1290/1290 controller suite passing (+1).

Task 1.7 of .kiro/specs/xce-test-cli-ux/tasks.md.
Foundation phase (1.1-1.7) now complete.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019jaMf9QEwpugH2W9KAuc7f
This commit is contained in:
Rongsong Shen 2026-09-09 11:06:31 +00:00
parent b70228c558
commit 4d1f247674
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2
5 changed files with 593 additions and 2 deletions

View file

@ -75,6 +75,7 @@ extern void test_flagspec(void);
extern void test_xcetest_interrupt(void);
extern void test_interruptcall(void);
extern void test_xcetest_process_entry(void);
extern void test_test_cli(void);
extern void test_drive_async_config(void);
extern void test_slowlane(void);
extern void test_commit_admission_pool(void);
@ -259,6 +260,7 @@ int main(int argc, char* argv[])
TEST(test_xcetest_interrupt);
TEST(test_interruptcall);
TEST(test_xcetest_process_entry);
TEST(test_test_cli);
TEST(test_drive_async_config);
TEST(test_slowlane);
TEST(test_commit_admission_pool);