diff options
author | felly <felly@google.com> | 2018-06-08 18:29:43 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-08 18:31:22 -0700 |
commit | d3d86440e90a8cef8483dec83f06c8a6f644603e (patch) | |
tree | b825d979009bef6dbf3a8f8c9429cb002d607500 /src/test/java/com/google/devtools/build/lib/exec/StandaloneTestStrategyTest.java | |
parent | 3694136dc22d9653c6b58a547be7957668b12818 (diff) |
Unify path resolution codepaths.
RELNOTES: None
PiperOrigin-RevId: 199880252
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/exec/StandaloneTestStrategyTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/exec/StandaloneTestStrategyTest.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/exec/StandaloneTestStrategyTest.java b/src/test/java/com/google/devtools/build/lib/exec/StandaloneTestStrategyTest.java index 1aa181856b..ab07910d60 100644 --- a/src/test/java/com/google/devtools/build/lib/exec/StandaloneTestStrategyTest.java +++ b/src/test/java/com/google/devtools/build/lib/exec/StandaloneTestStrategyTest.java @@ -29,6 +29,7 @@ import com.google.common.collect.MoreCollectors; import com.google.devtools.build.lib.actions.ActionExecutionContext; import com.google.devtools.build.lib.actions.ActionInput; import com.google.devtools.build.lib.actions.Artifact; +import com.google.devtools.build.lib.actions.ArtifactPathResolver; import com.google.devtools.build.lib.actions.SpawnActionContext; import com.google.devtools.build.lib.actions.SpawnResult; import com.google.devtools.build.lib.actions.SpawnResult.Status; @@ -128,6 +129,7 @@ public final class StandaloneTestStrategyTest extends BuildViewTestCase { when(actionExecutionContext.getClientEnv()).thenReturn(ImmutableMap.of()); when(actionExecutionContext.getEventHandler()).thenReturn(storedEvents); when(actionExecutionContext.getInputPath(any())).thenAnswer(this::getInputPathMock); + when(actionExecutionContext.getPathResolver()).thenReturn(ArtifactPathResolver.IDENTITY); SpawnResult expectedSpawnResult = new SpawnResult.Builder() @@ -206,6 +208,7 @@ public final class StandaloneTestStrategyTest extends BuildViewTestCase { when(actionExecutionContext.getClientEnv()).thenReturn(ImmutableMap.of()); when(actionExecutionContext.getEventHandler()).thenReturn(storedEvents); when(actionExecutionContext.getInputPath(any())).thenAnswer(this::getInputPathMock); + when(actionExecutionContext.getPathResolver()).thenReturn(ArtifactPathResolver.IDENTITY); SpawnResult failSpawnResult = new SpawnResult.Builder() @@ -300,6 +303,7 @@ public final class StandaloneTestStrategyTest extends BuildViewTestCase { when(actionExecutionContext.getClientEnv()).thenReturn(ImmutableMap.of()); when(actionExecutionContext.getEventHandler()).thenReturn(storedEvents); when(actionExecutionContext.getInputPath(any())).thenAnswer(this::getInputPathMock); + when(actionExecutionContext.getPathResolver()).thenReturn(ArtifactPathResolver.IDENTITY); SpawnResult expectedSpawnResult = new SpawnResult.Builder() @@ -378,6 +382,7 @@ public final class StandaloneTestStrategyTest extends BuildViewTestCase { when(actionExecutionContext.getClientEnv()).thenReturn(ImmutableMap.of()); when(actionExecutionContext.getEventHandler()).thenReturn(storedEvents); when(actionExecutionContext.getInputPath(any())).thenAnswer(this::getInputPathMock); + when(actionExecutionContext.getPathResolver()).thenReturn(ArtifactPathResolver.IDENTITY); SpawnResult expectedSpawnResult = new SpawnResult.Builder() @@ -472,6 +477,7 @@ public final class StandaloneTestStrategyTest extends BuildViewTestCase { when(actionExecutionContext.getEventHandler()).thenReturn(reporter); when(actionExecutionContext.getEventBus()).thenReturn(eventBus); when(actionExecutionContext.getInputPath(any())).thenAnswer(this::getInputPathMock); + when(actionExecutionContext.getPathResolver()).thenReturn(ArtifactPathResolver.IDENTITY); Path outPath = tmpDirRoot.getRelative("test-out.txt"); Path errPath = tmpDirRoot.getRelative("test-err.txt"); @@ -562,6 +568,7 @@ public final class StandaloneTestStrategyTest extends BuildViewTestCase { when(actionExecutionContext.getEventHandler()).thenReturn(reporter); when(actionExecutionContext.getEventBus()).thenReturn(eventBus); when(actionExecutionContext.getInputPath(any())).thenAnswer(this::getInputPathMock); + when(actionExecutionContext.getPathResolver()).thenReturn(ArtifactPathResolver.IDENTITY); Path outPath = tmpDirRoot.getRelative("test-out.txt"); Path errPath = tmpDirRoot.getRelative("test-err.txt"); FileOutErr outErr = new FileOutErr(outPath, errPath); |