mirror of
https://github.com/openai/codex.git
synced 2026-04-24 06:35:50 +00:00
codex: fix Bazel insta snapshot paths (#13593)
This commit is contained in:
8
defs.bzl
8
defs.bzl
@@ -80,7 +80,7 @@ def codex_rust_crate(
|
||||
`CARGO_BIN_EXE_*` environment variables. These are only needed for binaries from a different crate.
|
||||
"""
|
||||
test_env = {
|
||||
"INSTA_WORKSPACE_ROOT": ".",
|
||||
"INSTA_WORKSPACE_ROOT": "codex-rs",
|
||||
"INSTA_SNAPSHOT_PATH": "src",
|
||||
}
|
||||
|
||||
@@ -127,7 +127,9 @@ def codex_rust_crate(
|
||||
crate = name,
|
||||
env = test_env,
|
||||
deps = all_crate_deps(normal = True, normal_dev = True) + maybe_deps + deps_extra,
|
||||
rustc_flags = rustc_flags_extra,
|
||||
# Keep `file!()` paths Cargo-like (`core/src/...`) instead of
|
||||
# Bazel workspace-prefixed (`codex-rs/core/src/...`) for snapshot parity.
|
||||
rustc_flags = rustc_flags_extra + ["--remap-path-prefix=codex-rs="],
|
||||
rustc_env = rustc_env,
|
||||
data = test_data_extra,
|
||||
tags = test_tags,
|
||||
@@ -178,7 +180,7 @@ def codex_rust_crate(
|
||||
rustc_flags = rustc_flags_extra + ["--remap-path-prefix=codex-rs="],
|
||||
rustc_env = rustc_env,
|
||||
# Important: do not merge `test_env` here. Its unit-test-only
|
||||
# `INSTA_WORKSPACE_ROOT="."` can point integration tests at the
|
||||
# `INSTA_WORKSPACE_ROOT="codex-rs"` can point integration tests at the
|
||||
# runfiles cwd and cause false `.snap.new` churn on Linux.
|
||||
env = cargo_env,
|
||||
tags = test_tags,
|
||||
|
||||
Reference in New Issue
Block a user