diff options
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/runtime')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java | 3 | ||||
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/runtime/ExperimentalStateTrackerTest.java | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java b/src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java index b5227056fe..023ce8475a 100644 --- a/src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java +++ b/src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java @@ -55,6 +55,7 @@ import com.google.devtools.build.lib.collect.nestedset.NestedSetView; import com.google.devtools.build.lib.testutil.FoundationTestCase; import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.PathFragment; +import com.google.devtools.build.lib.vfs.Root; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -520,7 +521,7 @@ public class BuildEventStreamerTest extends FoundationTestCase { private Artifact makeArtifact(String pathString) { Path path = outputBase.getRelative(PathFragment.create(pathString)); - return new Artifact(path, ArtifactRoot.asSourceRoot(outputBase)); + return new Artifact(path, ArtifactRoot.asSourceRoot(Root.fromPath(outputBase))); } @Test diff --git a/src/test/java/com/google/devtools/build/lib/runtime/ExperimentalStateTrackerTest.java b/src/test/java/com/google/devtools/build/lib/runtime/ExperimentalStateTrackerTest.java index b7db0b3a8b..64244a5787 100644 --- a/src/test/java/com/google/devtools/build/lib/runtime/ExperimentalStateTrackerTest.java +++ b/src/test/java/com/google/devtools/build/lib/runtime/ExperimentalStateTrackerTest.java @@ -51,6 +51,7 @@ import com.google.devtools.build.lib.util.Pair; import com.google.devtools.build.lib.util.io.LoggingTerminalWriter; import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.PathFragment; +import com.google.devtools.build.lib.vfs.Root; import com.google.devtools.build.lib.view.test.TestStatus.BlazeTestStatus; import java.io.IOException; import java.net.URL; @@ -68,7 +69,7 @@ public class ExperimentalStateTrackerTest extends FoundationTestCase { private Action mockAction(String progressMessage, String primaryOutput) { Path path = outputBase.getRelative(PathFragment.create(primaryOutput)); - Artifact artifact = new Artifact(path, ArtifactRoot.asSourceRoot(outputBase)); + Artifact artifact = new Artifact(path, ArtifactRoot.asSourceRoot(Root.fromPath(outputBase))); Action action = Mockito.mock(Action.class); when(action.getProgressMessage()).thenReturn(progressMessage); @@ -473,7 +474,7 @@ public class ExperimentalStateTrackerTest extends FoundationTestCase { ManualClock clock = new ManualClock(); Path path = outputBase.getRelative(PathFragment.create(primaryOutput)); - Artifact artifact = new Artifact(path, ArtifactRoot.asSourceRoot(outputBase)); + Artifact artifact = new Artifact(path, ArtifactRoot.asSourceRoot(Root.fromPath(outputBase))); ActionExecutionMetadata actionMetadata = Mockito.mock(ActionExecutionMetadata.class); when(actionMetadata.getOwner()).thenReturn(Mockito.mock(ActionOwner.class)); when(actionMetadata.getPrimaryOutput()).thenReturn(artifact); |