aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/rules/cpp
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2016-09-19 18:08:59 +0000
committerGravatar Laszlo Csomor <laszlocsomor@google.com>2016-09-20 06:45:52 +0000
commit82d43279f93d95e4c41b4bc598a3cc05ddd1ae1a (patch)
tree6554cd4499ca265d9ad9ae1d3ef9867afe97e0c6 /src/test/java/com/google/devtools/build/lib/rules/cpp
parent35b50d26893147c642eeb48b8247350a87f03741 (diff)
Change execution root for external repositories to be ../repo
Some of the important aspect of this change: * Remote repos in the execution root are under output_base/execroot/repo_name, so the prefix is ../repo_name (to escape the local workspace name). * Package roots for external repos were previously "output_base/", they are now output_base/external/repo_name (which means source artifacts always have a relative path from their repository). * Outputs are under bazel-bin/external/repo_name/ (or similarly under genfiles). Note that this is a bit of a change from how this was implemented in the previous cl. Fixes #1262. RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. Roll forward of bdfd58a. -- MOS_MIGRATED_REVID=133606309
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/rules/cpp')
-rw-r--r--src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java2
-rw-r--r--src/test/java/com/google/devtools/build/lib/rules/cpp/CcLibraryConfiguredTargetTest.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java
index 1fab14fa9b..5b3d20ca95 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java
@@ -696,7 +696,7 @@ public class CcCommonTest extends BuildViewTestCase {
checkError(
"test",
"bad_relative_include",
- "Path references a path above the execution root.",
+ "../.. references a path above the execution root (..).",
"cc_library(name='bad_relative_include', srcs=[], includes=['../..'])");
}
diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcLibraryConfiguredTargetTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcLibraryConfiguredTargetTest.java
index 2099df68a1..e476138dbe 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcLibraryConfiguredTargetTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcLibraryConfiguredTargetTest.java
@@ -1121,8 +1121,8 @@ public class CcLibraryConfiguredTargetTest extends BuildViewTestCase {
@Test
public void testSystemIncludePathsOutsideExecutionRoot() throws Exception {
checkError("root", "a",
- "The include path '../system' references a path outside of the execution root.",
- "cc_library(name='a', srcs=['a.cc'], copts=['-isystem../system'])");
+ "The include path '../../system' references a path outside of the execution root.",
+ "cc_library(name='a', srcs=['a.cc'], copts=['-isystem../../system'])");
}
@Test