aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google
diff options
context:
space:
mode:
authorGravatar shahan <shahan@google.com>2018-04-06 19:17:12 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-04-06 19:19:03 -0700
commitb3ba514ccc505481c77ff05a1fbed24844e0afd1 (patch)
tree266c048286bb8fc6a4ed80204943d87f8d5b0d8d /src/test/java/com/google
parent7f63bec55ef34fbaaab5f61987e77512543eece3 (diff)
Cleanup Artifact.getPath() usage in Runfiles.
PiperOrigin-RevId: 191971225
Diffstat (limited to 'src/test/java/com/google')
-rw-r--r--src/test/java/com/google/devtools/build/lib/analysis/RunfilesTest.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/RunfilesTest.java b/src/test/java/com/google/devtools/build/lib/analysis/RunfilesTest.java
index e31d516f2d..6e2e3a1850 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/RunfilesTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/RunfilesTest.java
@@ -41,7 +41,7 @@ import org.junit.runners.JUnit4;
public class RunfilesTest extends FoundationTestCase {
private void checkWarning() {
- assertContainsEvent("obscured by a -> /workspace/a");
+ assertContainsEvent("obscured by a -> x");
assertWithMessage("Runfiles.filterListForObscuringSymlinks should have warned once")
.that(eventCollector.count())
.isEqualTo(1);
@@ -53,7 +53,7 @@ public class RunfilesTest extends FoundationTestCase {
Map<PathFragment, Artifact> obscuringMap = new HashMap<>();
PathFragment pathA = PathFragment.create("a");
ArtifactRoot root = ArtifactRoot.asSourceRoot(Root.fromPath(scratch.resolve("/workspace")));
- Artifact artifactA = new Artifact(PathFragment.create("a"), root);
+ Artifact artifactA = new Artifact(PathFragment.create("x"), root);
obscuringMap.put(pathA, artifactA);
obscuringMap.put(PathFragment.create("a/b"), new Artifact(PathFragment.create("c/b"),
root));
@@ -67,8 +67,7 @@ public class RunfilesTest extends FoundationTestCase {
Map<PathFragment, Artifact> obscuringMap = new HashMap<>();
PathFragment pathA = PathFragment.create("a");
ArtifactRoot root = ArtifactRoot.asSourceRoot(Root.fromPath(scratch.resolve("/workspace")));
- Artifact artifactA = new Artifact(PathFragment.create("a"),
- root);
+ Artifact artifactA = new Artifact(PathFragment.create("x"), root);
obscuringMap.put(pathA, artifactA);
obscuringMap.put(PathFragment.create("a/b/c"), new Artifact(PathFragment.create("b/c"),
root));