aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/exec
diff options
context:
space:
mode:
authorGravatar tomlu <tomlu@google.com>2017-12-28 12:25:26 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2017-12-28 12:27:20 -0800
commitef2f5aeba13c15faad36cfb1d13426f8c0636b46 (patch)
tree4c9b58ef1eae682f8fb848d3ffd110568cfdf5b9 /src/test/java/com/google/devtools/build/lib/exec
parent906c7cbd0e990841c53af8664d8b699c2987823e (diff)
Undo change to introduce methods to remove file system instance from Path.
I no longer believe that it is worthwhile to remove the file system instance from Path. Measurements indicate that I can simply replace the Path implementation in one go and just leave the instance on the Path class. This CL was done entirely using IDE refactoring, so should be safe. PiperOrigin-RevId: 180287162
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/exec')
-rw-r--r--src/test/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunnerTest.java32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunnerTest.java b/src/test/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunnerTest.java
index 31b46c26b2..899d99837e 100644
--- a/src/test/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunnerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunnerTest.java
@@ -713,7 +713,7 @@ public class LocalSpawnRunnerTest {
* Copies the {@code process-wrapper} tool into the path under the temporary execRoot where the
* {@link LocalSpawnRunner} expects to find it.
*/
- private Path copyProcessWrapperIntoExecRoot(FileSystem fs, Path execRoot) throws IOException {
+ private Path copyProcessWrapperIntoExecRoot(Path execRoot) throws IOException {
File realProcessWrapperFile =
new File(
PathFragment.create(BlazeTestUtils.runfilesDir())
@@ -722,16 +722,16 @@ public class LocalSpawnRunnerTest {
assertThat(realProcessWrapperFile.exists()).isTrue();
Path binDirectoryPath = execRoot.getRelative("_bin");
- binDirectoryPath.createDirectory(fs);
+ binDirectoryPath.createDirectory();
Path execRootProcessWrapperPath = binDirectoryPath.getRelative("process-wrapper");
File execRootCpuTimeSpenderFile = execRootProcessWrapperPath.getPathFile();
- assertThat(execRootProcessWrapperPath.exists(fs)).isFalse();
+ assertThat(execRootProcessWrapperPath.exists()).isFalse();
Files.copy(realProcessWrapperFile, execRootCpuTimeSpenderFile);
- assertThat(execRootProcessWrapperPath.exists(fs)).isTrue();
+ assertThat(execRootProcessWrapperPath.exists()).isTrue();
- execRootProcessWrapperPath.setExecutable(fs, true);
+ execRootProcessWrapperPath.setExecutable(true);
return execRootProcessWrapperPath;
}
@@ -740,7 +740,7 @@ public class LocalSpawnRunnerTest {
* Copies the {@code spend_cpu_time} test util into the temporary execRoot so that the {@link
* LocalSpawnRunner} can execute it.
*/
- private Path copyCpuTimeSpenderIntoExecRoot(FileSystem fs, Path execRoot) throws IOException {
+ private Path copyCpuTimeSpenderIntoExecRoot(Path execRoot) throws IOException {
File realCpuTimeSpenderFile =
new File(
PathFragment.create(BlazeTestUtils.runfilesDir())
@@ -751,11 +751,11 @@ public class LocalSpawnRunnerTest {
Path execRootCpuTimeSpenderPath = execRoot.getRelative("spend-cpu-time");
File execRootCpuTimeSpenderFile = execRootCpuTimeSpenderPath.getPathFile();
- assertThat(execRootCpuTimeSpenderPath.exists(fs)).isFalse();
+ assertThat(execRootCpuTimeSpenderPath.exists()).isFalse();
Files.copy(realCpuTimeSpenderFile, execRootCpuTimeSpenderFile);
- assertThat(execRootCpuTimeSpenderPath.exists(fs)).isTrue();
+ assertThat(execRootCpuTimeSpenderPath.exists()).isTrue();
- execRootCpuTimeSpenderPath.setExecutable(fs, true);
+ execRootCpuTimeSpenderPath.setExecutable(true);
return execRootCpuTimeSpenderPath;
}
@@ -770,11 +770,11 @@ public class LocalSpawnRunnerTest {
tempDirFile.deleteOnExit();
Path tempDirPath = fs.getPath(tempDirFile.getPath());
- assertThat(tempDirPath.exists(fs)).isTrue();
+ assertThat(tempDirPath.exists()).isTrue();
Path execRoot = tempDirPath.getRelative("execroot");
- assertThat(execRoot.createDirectory(fs)).isTrue();
- assertThat(execRoot.exists(fs)).isTrue();
+ assertThat(execRoot.createDirectory()).isTrue();
+ assertThat(execRoot.exists()).isTrue();
return execRoot;
}
@@ -800,8 +800,8 @@ public class LocalSpawnRunnerTest {
Duration maximumSystemTimeToSpend = minimumSystemTimeToSpend.plus(Duration.ofSeconds(2));
Path execRoot = getTemporaryExecRoot(fs);
- copyProcessWrapperIntoExecRoot(fs, execRoot);
- Path cpuTimeSpenderPath = copyCpuTimeSpenderIntoExecRoot(fs, execRoot);
+ copyProcessWrapperIntoExecRoot(execRoot);
+ Path cpuTimeSpenderPath = copyCpuTimeSpenderIntoExecRoot(execRoot);
LocalSpawnRunner runner =
new LocalSpawnRunner(
@@ -862,8 +862,8 @@ public class LocalSpawnRunnerTest {
Duration minimumSystemTimeToSpend = Duration.ZERO;
Path execRoot = getTemporaryExecRoot(fs);
- copyProcessWrapperIntoExecRoot(fs, execRoot);
- Path cpuTimeSpenderPath = copyCpuTimeSpenderIntoExecRoot(fs, execRoot);
+ copyProcessWrapperIntoExecRoot(execRoot);
+ Path cpuTimeSpenderPath = copyCpuTimeSpenderIntoExecRoot(execRoot);
LocalSpawnRunner runner =
new LocalSpawnRunner(