aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/analysis
diff options
context:
space:
mode:
authorGravatar lberki <lberki@google.com>2017-10-23 10:33:12 +0200
committerGravatar Dmitry Lomov <dslomov@google.com>2017-10-23 17:16:23 +0200
commit0446714686119dd97f8d1f99290f98db91a65e44 (patch)
treefbf58e2a2b1881299d5703066d6063a85fda4c73 /src/test/java/com/google/devtools/build/lib/analysis
parent61ccb61293030fec874303cf21e70eaf17a0aabb (diff)
Automated rollback of commit f9a379157d1e992390c5b6f0b75ef853e0870689.
*** Reason for rollback *** Breaks a single, but very important target :( *** Original change description *** Remove OS/Xcode versions (and thus package loading) from AppleConfiguration.Loader. Fixes #3424. RELNOTES[INC]: Selecting on "xcode_version" and "{ios,tvos,macos,watchos}_sdk_version" is not supported anymore. What was config_setting(values={"$FOO_version": $VALUE}) is now config_setting(flag_values={"@bazel_tools//tools/osx:$FOO_version_flag": $VALUE}). PiperOrigin-RevId: 173085962
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/analysis')
-rw-r--r--src/test/java/com/google/devtools/build/lib/analysis/BuildViewTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/BuildViewTest.java b/src/test/java/com/google/devtools/build/lib/analysis/BuildViewTest.java
index b0a5585470..ae217d3b54 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/BuildViewTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/BuildViewTest.java
@@ -1108,6 +1108,23 @@ public class BuildViewTest extends BuildViewTestBase {
}
@Test
+ public void testMissingXcodeVersion() throws Exception {
+ // The xcode_version flag uses yet another code path on top of the redirect chaser.
+ // Note that the redirect chaser throws if it can't find a package, but doesn't throw if it
+ // can't find a label in a package - that's why we use an empty package here.
+ scratch.file("xcode/BUILD");
+ useConfiguration("--xcode_version=1.2", "--xcode_version_config=//xcode:does_not_exist");
+ reporter.removeHandler(failFastHandler);
+ try {
+ update(defaultFlags().with(Flag.KEEP_GOING));
+ fail();
+ } catch (InvalidConfigurationException e) {
+ assertThat(e).hasMessageThat().contains("//xcode:does_not_exist");
+ }
+ }
+
+
+ @Test
public void testVisibilityReferencesNonexistentPackage() throws Exception {
scratch.file("z/a/BUILD",
"py_library(name='a', visibility=['//nonexistent:nothing'])");