Rename Root to ArtifactRoot.
This is slightly more descriptive, and we will potentially want to use the name Root for a broader concept shared between ArtifactRoot and RootedPath.
PiperOrigin-RevId: 182082367
diff --git a/src/test/java/com/google/devtools/build/lib/exec/SpawnInputExpanderTest.java b/src/test/java/com/google/devtools/build/lib/exec/SpawnInputExpanderTest.java
index 71359fd..9e14fac 100644
--- a/src/test/java/com/google/devtools/build/lib/exec/SpawnInputExpanderTest.java
+++ b/src/test/java/com/google/devtools/build/lib/exec/SpawnInputExpanderTest.java
@@ -20,8 +20,8 @@
import com.google.devtools.build.lib.actions.ActionInput;
import com.google.devtools.build.lib.actions.ActionInputHelper;
import com.google.devtools.build.lib.actions.Artifact;
+import com.google.devtools.build.lib.actions.ArtifactRoot;
import com.google.devtools.build.lib.actions.EmptyRunfilesSupplier;
-import com.google.devtools.build.lib.actions.Root;
import com.google.devtools.build.lib.actions.RunfilesSupplier;
import com.google.devtools.build.lib.analysis.Runfiles;
import com.google.devtools.build.lib.analysis.RunfilesSupplierImpl;
@@ -76,7 +76,7 @@
@Test
public void testRunfilesSingleFile() throws Exception {
Artifact artifact =
- new Artifact(fs.getPath("/root/dir/file"), Root.asSourceRoot(fs.getPath("/root")));
+ new Artifact(fs.getPath("/root/dir/file"), ArtifactRoot.asSourceRoot(fs.getPath("/root")));
Runfiles runfiles = new Runfiles.Builder("workspace").addArtifact(artifact).build();
RunfilesSupplier supplier = new RunfilesSupplierImpl(PathFragment.create("runfiles"), runfiles);
FakeActionInputFileCache mockCache = new FakeActionInputFileCache();
@@ -91,7 +91,7 @@
@Test
public void testRunfilesDirectoryStrict() throws Exception {
Artifact artifact =
- new Artifact(fs.getPath("/root/dir/file"), Root.asSourceRoot(fs.getPath("/root")));
+ new Artifact(fs.getPath("/root/dir/file"), ArtifactRoot.asSourceRoot(fs.getPath("/root")));
Runfiles runfiles = new Runfiles.Builder("workspace").addArtifact(artifact).build();
RunfilesSupplier supplier = new RunfilesSupplierImpl(PathFragment.create("runfiles"), runfiles);
FakeActionInputFileCache mockCache = new FakeActionInputFileCache();
@@ -108,7 +108,7 @@
@Test
public void testRunfilesDirectoryNonStrict() throws Exception {
Artifact artifact =
- new Artifact(fs.getPath("/root/dir/file"), Root.asSourceRoot(fs.getPath("/root")));
+ new Artifact(fs.getPath("/root/dir/file"), ArtifactRoot.asSourceRoot(fs.getPath("/root")));
Runfiles runfiles = new Runfiles.Builder("workspace").addArtifact(artifact).build();
RunfilesSupplier supplier = new RunfilesSupplierImpl(PathFragment.create("runfiles"), runfiles);
FakeActionInputFileCache mockCache = new FakeActionInputFileCache();
@@ -124,9 +124,9 @@
@Test
public void testRunfilesTwoFiles() throws Exception {
Artifact artifact1 =
- new Artifact(fs.getPath("/root/dir/file"), Root.asSourceRoot(fs.getPath("/root")));
+ new Artifact(fs.getPath("/root/dir/file"), ArtifactRoot.asSourceRoot(fs.getPath("/root")));
Artifact artifact2 =
- new Artifact(fs.getPath("/root/dir/baz"), Root.asSourceRoot(fs.getPath("/root")));
+ new Artifact(fs.getPath("/root/dir/baz"), ArtifactRoot.asSourceRoot(fs.getPath("/root")));
Runfiles runfiles = new Runfiles.Builder("workspace")
.addArtifact(artifact1)
.addArtifact(artifact2)
@@ -147,7 +147,7 @@
@Test
public void testRunfilesSymlink() throws Exception {
Artifact artifact =
- new Artifact(fs.getPath("/root/dir/file"), Root.asSourceRoot(fs.getPath("/root")));
+ new Artifact(fs.getPath("/root/dir/file"), ArtifactRoot.asSourceRoot(fs.getPath("/root")));
Runfiles runfiles = new Runfiles.Builder("workspace")
.addSymlink(PathFragment.create("symlink"), artifact).build();
RunfilesSupplier supplier = new RunfilesSupplierImpl(PathFragment.create("runfiles"), runfiles);
@@ -163,7 +163,7 @@
@Test
public void testRunfilesRootSymlink() throws Exception {
Artifact artifact =
- new Artifact(fs.getPath("/root/dir/file"), Root.asSourceRoot(fs.getPath("/root")));
+ new Artifact(fs.getPath("/root/dir/file"), ArtifactRoot.asSourceRoot(fs.getPath("/root")));
Runfiles runfiles = new Runfiles.Builder("workspace")
.addRootSymlink(PathFragment.create("symlink"), artifact).build();
RunfilesSupplier supplier = new RunfilesSupplierImpl(PathFragment.create("runfiles"), runfiles);
@@ -185,7 +185,8 @@
// See AnalysisUtils for the mapping from "foo" to "_foo/MANIFEST".
scratchFile("/root/out/_foo/MANIFEST");
- Root outputRoot = Root.asDerivedRoot(fs.getPath("/root"), fs.getPath("/root/out"));
+ ArtifactRoot outputRoot =
+ ArtifactRoot.asDerivedRoot(fs.getPath("/root"), fs.getPath("/root/out"));
Artifact artifact = new Artifact(fs.getPath("/root/out/foo"), outputRoot);
expander.parseFilesetManifest(inputMappings, artifact, "workspace");
assertThat(inputMappings).isEmpty();
@@ -199,7 +200,8 @@
"workspace/bar /dir/file",
"<some digest>");
- Root outputRoot = Root.asDerivedRoot(fs.getPath("/root"), fs.getPath("/root/out"));
+ ArtifactRoot outputRoot =
+ ArtifactRoot.asDerivedRoot(fs.getPath("/root"), fs.getPath("/root/out"));
Artifact artifact = new Artifact(fs.getPath("/root/out/foo"), outputRoot);
expander.parseFilesetManifest(inputMappings, artifact, "workspace");
assertThat(inputMappings).hasSize(1);
@@ -217,7 +219,8 @@
"workspace/baz /dir/file",
"<some digest>");
- Root outputRoot = Root.asDerivedRoot(fs.getPath("/root"), fs.getPath("/root/out"));
+ ArtifactRoot outputRoot =
+ ArtifactRoot.asDerivedRoot(fs.getPath("/root"), fs.getPath("/root/out"));
Artifact artifact = new Artifact(fs.getPath("/root/out/foo"), outputRoot);
expander.parseFilesetManifest(inputMappings, artifact, "workspace");
assertThat(inputMappings).hasSize(2);
@@ -235,7 +238,8 @@
"workspace/bar /some",
"<some digest>");
- Root outputRoot = Root.asDerivedRoot(fs.getPath("/root"), fs.getPath("/root/out"));
+ ArtifactRoot outputRoot =
+ ArtifactRoot.asDerivedRoot(fs.getPath("/root"), fs.getPath("/root/out"));
Artifact artifact = new Artifact(fs.getPath("/root/out/foo"), outputRoot);
expander.parseFilesetManifest(inputMappings, artifact, "workspace");
assertThat(inputMappings).hasSize(1);