mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-09-02 17:49:20 +00:00
fix(ci): flush profraw coverage data in E2E teardown (#550)
The ironclaw binary only handles SIGINT (via tokio::signal::ctrl_c), not SIGTERM. When conftest.py sent SIGTERM during teardown, the OS killed the process immediately without running atexit handlers, so LLVM never flushed .profraw files. cargo llvm-cov report then found zero profraw files and failed. - Send SIGINT instead of SIGTERM so the existing ctrl_c handler triggers graceful shutdown → main() returns → atexit runs → profraw flushed - Increase shutdown wait from 5s to 10s for graceful cleanup - Add a diagnostic step to verify profraw files exist before the report step, making future issues visible in CI logs Co-authored-by: Claude Opus 4.6 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
f99991d27b
commit
e24c33ff90
@@ -133,9 +133,12 @@ async def ironclaw_server(ironclaw_binary, mock_llm_server):
|
||||
)
|
||||
finally:
|
||||
if proc.returncode is None:
|
||||
proc.send_signal(signal.SIGTERM)
|
||||
# Use SIGINT (not SIGTERM) so tokio's ctrl_c handler triggers a
|
||||
# graceful shutdown. This lets the LLVM coverage runtime run its
|
||||
# atexit handler and flush .profraw files for cargo-llvm-cov.
|
||||
proc.send_signal(signal.SIGINT)
|
||||
try:
|
||||
await asyncio.wait_for(proc.wait(), timeout=5)
|
||||
await asyncio.wait_for(proc.wait(), timeout=10)
|
||||
except asyncio.TimeoutError:
|
||||
proc.kill()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user