Skip to content

Commit

Permalink
Partial rollback of commit dd142c9.
Browse files Browse the repository at this point in the history
Should fix bazelbuild#2721.

--
PiperOrigin-RevId: 150866145
MOS_MIGRATED_REVID=150866145
  • Loading branch information
philwo authored and hermione521 committed Mar 22, 2017
1 parent c34320d commit b3dfc40
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/main/java/com/google/devtools/build/lib/exec/TestStrategy.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,18 +286,9 @@ protected TestCase parseTestResult(Path resultFile) {
* --test_tmpdir. This does not create the directory.
*/
public static Path getTmpRoot(Path workspace, Path execRoot, ExecutionOptions executionOptions) {
if (executionOptions.testTmpDir != null) {
return workspace.getRelative(executionOptions.testTmpDir).getRelative(TEST_TMP_ROOT);
}
switch (OS.getCurrent()) {
case WINDOWS:
// TODO(philwo) find a better way to do this
// Hardcoding this to c:/temp isn't great, but if we use a longer path, we trip the MAX_PATH
// limit of the Windows API when running bazel inside shell integration tests.
return workspace.getFileSystem().getPath("c:/temp");
default:
return execRoot.getRelative(TEST_TMP_ROOT);
}
return executionOptions.testTmpDir != null
? workspace.getRelative(executionOptions.testTmpDir).getRelative(TEST_TMP_ROOT)
: execRoot.getRelative(TEST_TMP_ROOT);
}

/**
Expand Down

0 comments on commit b3dfc40

Please sign in to comment.