mirror of
https://github.com/openai/codex.git
synced 2026-04-27 16:15:09 +00:00
codex: avoid python stub in exec-server tests
Use /bin/sh for the PTY/stdin and write-denial probes so the tests do not depend on /usr/bin/python3 being usable on macOS Bazel runners. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -174,9 +174,9 @@ async fn assert_exec_process_write_then_read(use_remote: bool) -> Result<()> {
|
||||
.start(ExecParams {
|
||||
process_id: process_id.clone().into(),
|
||||
argv: vec![
|
||||
"/usr/bin/python3".to_string(),
|
||||
"/bin/sh".to_string(),
|
||||
"-c".to_string(),
|
||||
"import sys; line = sys.stdin.readline(); sys.stdout.write(f'from-stdin:{line}'); sys.stdout.flush()".to_string(),
|
||||
"IFS= read -r line; printf 'from-stdin:%s\\n' \"$line\"".to_string(),
|
||||
],
|
||||
cwd: cwd.clone(),
|
||||
env: Default::default(),
|
||||
@@ -276,10 +276,10 @@ async fn assert_exec_process_sandbox_denies_write_outside_workspace(
|
||||
.start(ExecParams {
|
||||
process_id: ProcessId::from("proc-sandbox-denied"),
|
||||
argv: vec![
|
||||
"/usr/bin/python3".to_string(),
|
||||
"/bin/sh".to_string(),
|
||||
"-c".to_string(),
|
||||
"from pathlib import Path; import sys; Path(sys.argv[1]).write_text('blocked')"
|
||||
.to_string(),
|
||||
"printf blocked > \"$1\"".to_string(),
|
||||
"write-outside-workspace".to_string(),
|
||||
blocked_path.to_string_lossy().into_owned(),
|
||||
],
|
||||
cwd: workspace_root.clone(),
|
||||
|
||||
Reference in New Issue
Block a user