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

Let Starlark tests inherit env variables #14849

Closed
wants to merge 5 commits into from

Commits on Apr 1, 2022

  1. Let Starlark tests inherit env variables

    Adds an inherited_environment field to testing.TestEnvironment to allow
    Starlark rules to implement the equivalent of the native rules'
    `env_inherit` attribute.
    
    Work towards bazelbuild#7364. To fully resolve that issue, it remains to handle
    executable non-test rules.
    
    RELNOTES: Starlark test rules can use the new inherited_environment
    parameter of testing.TestEnvironment to specify environment variables
    whose values should be inherited from the shell environment.
    fmeum committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    98b064b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    27fa390 View commit details
    Browse the repository at this point in the history
  3. Make adding inherited vars to ActionEnvironment memory efficient

    Along the way, this commit optimizes away a few potential allocations
    of empty ActionEnvironment instances.
    fmeum committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    11532ef View commit details
    Browse the repository at this point in the history
  4. Specify fixedEnv/inheritedEnv interaction

    Also renames addVariables and addFixedVariables to better reflect that
    they are operating on an immutable type.
    fmeum committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    f3a2402 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6088168 View commit details
    Browse the repository at this point in the history