Skip to content

Commit 9e791e7

Browse files
Include env variables in the runner as well (#2704)
Useful for `{pre,post}_action`s. Also mirrors `--test_env` behavior. Signed-off-by: Brentley Jones <[email protected]>
1 parent 84d0bfd commit 9e791e7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

apple/internal/testing/apple_test_rule_support.bzl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,13 @@ def _apple_test_rule_impl(*, ctx, requires_dossiers, test_type):
307307
# Environment variables for the Bazel test action itself.
308308
execution_environment = dict(getattr(runner_info, "execution_environment", {}))
309309

310+
# Include the test rule env in the execution environment, to match
311+
# `--test_env` behavior
312+
execution_environment = dicts.add(
313+
execution_environment,
314+
rule_test_env,
315+
)
316+
310317
# Bundle name of the app under test (test host) if given
311318
test_host_bundle_name = ""
312319
test_host_dossier = None

0 commit comments

Comments
 (0)