mirror of
https://github.com/openai/codex.git
synced 2026-09-20 12:47:38 +00:00
Support env_inherit in workspace_root_test (#46534)
Add an `env_inherit` string-list attribute and pass it to `RunEnvironmentInfo.inherited_environment`, allowing tests to inherit selected environment variables from the calling environment. GitOrigin-RevId: 4ea868bda2d80dd57a8fc139ffa9625cb8311b37
This commit is contained in:
2
defs.bzl
2
defs.bzl
@@ -98,6 +98,7 @@ def _workspace_root_test_impl(ctx):
|
||||
),
|
||||
RunEnvironmentInfo(
|
||||
environment = env,
|
||||
inherited_environment = ctx.attr.env_inherit,
|
||||
),
|
||||
]
|
||||
|
||||
@@ -153,6 +154,7 @@ workspace_root_test = rule(
|
||||
allow_files = True,
|
||||
),
|
||||
"env": attr.string_dict(),
|
||||
"env_inherit": attr.string_list(),
|
||||
"runfile_env": attr.label_keyed_string_dict(
|
||||
cfg = "target",
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user