aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorGravatar Ulf Adams <ulfjack@google.com>2017-02-01 14:47:02 +0000
committerGravatar Yun Peng <pcloudy@google.com>2017-02-01 16:36:23 +0000
commitb3c833f2ee6e6daf7cfa5c616092d10cb14bd963 (patch)
tree8c60a381d0e83dbe6bb572f4d0cc1fc6f35eb04a /examples
parent932d1abfa34267a9e5abc7441c9e2a081beedd85 (diff)
Test strategy unification - extract env setup to a new class
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
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions