diff options
author | 2017-03-01 09:58:23 +0000 | |
---|---|---|
committer | 2017-03-01 12:36:19 +0000 | |
commit | 220b6390fcdb775bafc55793d2a722c44e08d30a (patch) | |
tree | 1c5f43e48bade0b9a0b61e8686c205d44b03e368 /src | |
parent | dc857b3f0785e15d48500a4f45cea804612ad3a0 (diff) |
Remove some unnecessary code
TestStrategy sometimes computed the runfiles directory separately from
the existing code in Runfiles. Now we always use the passed through value.
AFAICT, the two code paths were identical.
--
PiperOrigin-RevId: 148866489
MOS_MIGRATED_REVID=148866489
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/exec/TestStrategy.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/exec/TestStrategy.java b/src/main/java/com/google/devtools/build/lib/exec/TestStrategy.java index 4c94254613..904bfb2cd3 100644 --- a/src/main/java/com/google/devtools/build/lib/exec/TestStrategy.java +++ b/src/main/java/com/google/devtools/build/lib/exec/TestStrategy.java @@ -312,19 +312,15 @@ public abstract class TestStrategy implements TestActionContext { boolean enableRunfiles) throws ExecException, InterruptedException { TestTargetExecutionSettings execSettings = testAction.getExecutionSettings(); + Path runfilesDir = execSettings.getRunfilesDir(); // If the symlink farm is already created then return the existing directory. If not we // need to explicitly build it. This can happen when --nobuild_runfile_links is supplied // as a flag to the build. if (execSettings.getRunfilesSymlinksCreated()) { - return execSettings.getRunfilesDir(); + return runfilesDir; } - // TODO(bazel-team): Should we be using TestTargetExecutionSettings#getRunfilesDir() here over - // generating the directory ourselves? - Path program = execSettings.getExecutable().getPath(); - Path runfilesDir = program.getParentDirectory().getChild(program.getBaseName() + ".runfiles"); - // Synchronize runfiles tree generation on the runfiles manifest artifact. // This is necessary, because we might end up with multiple test runner actions // trying to generate same runfiles tree in case of --runs_per_test > 1 or |