aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/exec/TestPolicy.java
Commit message (Collapse)AuthorAge
* A slight refactoring of RunCommand.Gravatar lberki2018-04-17
| | | | | RELNOTES: None. PiperOrigin-RevId: 193203414
* Move core test classes to lib.analysis.testGravatar ulfjack2017-08-11
| | | | | | | | These are depended upon by analysis code, so need to live in the same library as lib.analysis. Moving them here makes it possible to split the build-base library into separate libraries for analysis, execution, and rules. PiperOrigin-RevId: 164847161
* Use java.time.Duration for timeoutsGravatar ulfjack2017-08-09
| | | | PiperOrigin-RevId: 164577062
* Add ActionEnvironment, which is a wrapper class for a fixed+inherited envGravatar ulfjack2017-06-28
| | | | | | | | | | | | | | | | We are currently tracking the action environment (computed from --action_env), and the test action environment (computed from --test_env, and not including the action env) as two pairs of fields, and a lot of callers haven't been updated to handle both parts (TestRunnerAction does, but many 'normal' actions don't). However, both parts have always both be handled, and moving them into a single abstraction makes it harder to accidentally miss one part. We'll subsequently need to update all the action implementations to use the new abstraction, and also update the Skylark API (or bypass it and always apply the action environment for all actions, except we don't know which configuration to use). PiperOrigin-RevId: 160386181
* Track the test environment in Skyframe, like the action environmentGravatar ulfjack2017-06-09
| | | | | | | | Instead of passing a client env into the test strategies, use the same mechansim as --action_env, by depending on the right set of Skyframe nodes that correspond to client env entries. PiperOrigin-RevId: 158401670
* Test strategy unification - extract env setup to a new classGravatar Ulf Adams2017-02-01
Introduce a new class TestPolicy that computes the test environment and use it from all the test strategies instead of the previous duplicated code. Note how the TestPolicy constructs the environment in four steps, each of which can override variables set in a previous step: 1. set env variables for which we have a hard-coded policy 2. set env variables from --action_env 3. set env variables from --test_env 4. set env variables that are specific to the test (path locations, coverage collection protocol, test sharding protocol, etc.); the code for this lives in TestRunnerAction This changes the order in which env variables are set, which can change the resulting environment if --test_env or --action_env are set. We should consider not allowing the command-line flags to override TEST_SRCDIR, RUNFILES_DIR, or TEST_TMPDIR. We should also try to find a way to drop the RUNTEST_PRESERVE_CWD variable in coverage mode. I'm fairly sure that it's current use breaks the combination of coverage and --run_under. My current thinking is that we change the test setup script to source the coverage collector before changing the CWD. Another option is to merge the coverage collector into the test setup script. -- PiperOrigin-RevId: 146237448 MOS_MIGRATED_REVID=146237448