Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add env and env_inherit attributes #204

Merged
merged 6 commits into from
Jan 30, 2024
Merged

feat: add env and env_inherit attributes #204

merged 6 commits into from
Jan 30, 2024

Conversation

aherrmann
Copy link
Owner

bazel test strictly controls the environment. The env attribute can be used to configure additional environment variables in the BUILD file, the env_inherit attribute can be used to instruct Bazel to forward specific external environment variables into the test environment.

bazel run always forwards external environment variables. But, the env attribute can be used to configure additional environment variables to be set.

  • end-to-end test for environment setting/forwarding
  • Add env and env_inherit attributes.
  • Return RunEnvironmentInfo on executable targets
  • Integration test for environment forwarding
  • Test location expansion on env attribute
  • Update generated files

`bazel test` strictly controls the environment. The `env` attribute can
be used to configure additional environment variables in the `BUILD`
file, the `env_inherit` attribute can be used to instruct Bazel to
forward specific external environment variables into the test
environment.

`bazel run` always forwards external environment variables. But, the
`env` attribute can be used to configure additional environment
variables to be set.
Test that the `env` and `env_inherit` attributes influence the
environment as expected.

Also test that `bazel run` inherits the external environment.
@aherrmann aherrmann merged commit d278000 into main Jan 30, 2024
21 checks passed
@aherrmann aherrmann deleted the env branch January 30, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant