Partial rollback of commit
Should fix
MOS_MIGRATED_REVID=150866145
@@ -286,18 +286,9 @@ public abstract class TestStrategy implements TestActionContext {
* --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);
}
/**
