mirror of
https://github.com/openai/codex.git
synced 2026-11-20 22:40:37 +00:00
Stabilize cross-platform tests and directory-change fork permissions (#59369)
## Why Tests need to distinguish slow subprocess startup from operation timeouts and wait for asynchronous work before asserting results or cleaning up fixtures. ## What changed - Synchronize subprocess readiness, queued-turn completion, and matching UI events; allow more time for cold startup and separate startup from shutdown deadlines. - Adapt Windows fixtures and permission expectations, provide the voice-host test runtime DLL path, and normalize platform paths and animated status snapshots. - Use current configuration permissions when changing directories in embedded TUI sessions, while retaining saved permissions for remote sessions. - Allow the release prompt-prefix comparison to accept the exact image-tool description update that removes image detail options, and refresh the corresponding tool snapshot. ## Testing Extend inherited-session metadata coverage to both legacy and paginated thread history, including persisted history mode and revision-aware resume. GitOrigin-RevId: 0afb38403fc0adb0d83175344749584f0cdf9979
This commit is contained in:
committed by
copyberry
parent
71a4c07036
commit
021fccb046
@@ -483,11 +483,19 @@ async fn conpty_ctrl_c_interrupts_powershell_foreground_child() -> anyhow::Resul
|
||||
.await?;
|
||||
let (session, mut output_rx, exit_rx) = combine_spawned_output(spawned);
|
||||
let writer = session.writer_sender();
|
||||
writer.send(b"ping.exe -4 -t localhost\n".to_vec()).await?;
|
||||
wait_for_output_contains(&mut output_rx, "127.0.0.1", /*timeout_ms*/ 10_000).await?;
|
||||
// CI may pass its ignored Ctrl-C disposition to children. Reset it in the
|
||||
// foreground process itself before checking delivery through ConPTY.
|
||||
let python = find_python()
|
||||
.ok_or_else(|| anyhow::anyhow!("Python is required for the Ctrl-C fixture"))?;
|
||||
let python = python.replace('\'', "''");
|
||||
let command = format!(
|
||||
r#"& '{python}' -u -c "import ctypes,time; assert ctypes.windll.kernel32.SetConsoleCtrlHandler(None, False); print('__CODEX_CHILD_'+'READY__'); time.sleep(60)""#
|
||||
);
|
||||
writer.send(format!("{command}\n").into_bytes()).await?;
|
||||
wait_for_output_contains(&mut output_rx, READY_MARKER, /*timeout_ms*/ 10_000).await?;
|
||||
|
||||
writer.send(vec![0x03]).await?;
|
||||
tokio::time::sleep(tokio::time::Duration::from_millis(200)).await;
|
||||
wait_for_output_contains(&mut output_rx, "PS ", /*timeout_ms*/ 10_000).await?;
|
||||
writer.send(b"cmd.exe /D /C ver\n".to_vec()).await?;
|
||||
let mut output = wait_for_output_contains(
|
||||
&mut output_rx,
|
||||
|
||||
Reference in New Issue
Block a user