mirror of
https://github.com/openai/codex.git
synced 2026-11-23 23:10:47 +00:00
Make Codex tests more portable across environments (#63427)
## Why Read-only Bazel runfiles can leave copied patch fixtures unwritable, and restricted Linux environments can deny the mount setup Bubblewrap needs. Test environments can also lack Python or use paths long enough to produce identical truncated worktree headings. ## What changed - Write fresh, writable copies of patch scenario inputs. - Treat Bubblewrap's mount permission error as sandbox unavailability in the CLI and Linux sandbox tests. - Use `printf` and `tr` to generate output for code mode truncation tests. - Normalize one worktree heading at a time in the overview snapshot. GitOrigin-RevId: 88590c9c08a739ecdd4ed49bd41734b02ece3f66
This commit is contained in:
committed by
copyberry
parent
06d76ee77b
commit
91f5c31ddb
@@ -124,7 +124,8 @@ fn copy_dir_recursive(src: &Path, dst: &Path) -> anyhow::Result<()> {
|
||||
if let Some(parent) = dest_path.parent() {
|
||||
fs::create_dir_all(parent)?;
|
||||
}
|
||||
fs::copy(&path, &dest_path)?;
|
||||
// Scenario inputs must be writable even when Bazel runfiles are read-only.
|
||||
fs::write(&dest_path, fs::read(&path)?)?;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user