Change the key type we keep around in our fileset mappings.
There is no need to throw away the fact that the mapping is artifact -> fileset symlinks so early.
This CL is otherwise a no-op.
RELNOTES: None
PiperOrigin-RevId: 211808154
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 581dfc6..b7fd511 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
@@ -68,6 +68,7 @@
private FileSystem fs;
private Path execRoot;
+ private ArtifactRoot rootDir;
private SpawnInputExpander expander;
private Map<PathFragment, ActionInput> inputMappings;
@@ -75,6 +76,7 @@
public final void createSpawnInputExpander() {
fs = new InMemoryFileSystem();
execRoot = fs.getPath("/root");
+ rootDir = ArtifactRoot.asDerivedRoot(execRoot, fs.getPath("/root/out"));
expander = new SpawnInputExpander(execRoot, /*strict=*/ true);
inputMappings = Maps.newHashMap();
}
@@ -391,13 +393,21 @@
PathFragment.create(from), PathFragment.create(to));
}
- private ImmutableMap<PathFragment, ImmutableList<FilesetOutputSymlink>> simpleFilesetManifest() {
+ private ImmutableMap<Artifact, ImmutableList<FilesetOutputSymlink>> simpleFilesetManifest() {
return ImmutableMap.of(
- PathFragment.create("out"),
+ createFileset("out"),
ImmutableList.of(
filesetSymlink("workspace/bar", "foo"), filesetSymlink("workspace/foo", "/foo/bar")));
}
+ private SpecialArtifact createFileset(String execPath) {
+ return new SpecialArtifact(
+ rootDir,
+ PathFragment.create(execPath),
+ ArtifactOwner.NullArtifactOwner.INSTANCE,
+ SpecialArtifactType.FILESET);
+ }
+
@Test
public void testManifestWithErrorOnRelativeSymlink() throws Exception {
expander = new SpawnInputExpander(execRoot, /*strict=*/ true, ERROR);