aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/google/devtools/build')
-rw-r--r--src/test/java/com/google/devtools/build/lib/analysis/DependencyResolverTest.java9
-rw-r--r--src/test/java/com/google/devtools/build/lib/analysis/DependencyTest.java10
-rw-r--r--src/test/java/com/google/devtools/build/lib/analysis/mock/MOCK_CROSSTOOL43
3 files changed, 9 insertions, 53 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/DependencyResolverTest.java b/src/test/java/com/google/devtools/build/lib/analysis/DependencyResolverTest.java
index 1444837448..af37c8b78f 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/DependencyResolverTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/DependencyResolverTest.java
@@ -192,17 +192,16 @@ public class DependencyResolverTest extends AnalysisTestCase {
}
/**
- * Null configurations should be static whether we're building with static or dynamic
- * configurations. This is because the dynamic config logic that translates transitions into
- * final configurations can be trivially skipped in those cases.
+ * Null configurations should always be explicit (vs. holding transitions). This lets Bazel skip
+ * its complicated dependency configuration logic for these cases.
*/
@Test
- public void nullConfigurationsAlwaysStatic() throws Exception {
+ public void nullConfigurationsAlwaysExplicit() throws Exception {
pkg("a",
"genrule(name = 'gen', srcs = ['gen.in'], cmd = '', outs = ['gen.out'])");
update();
Dependency dep = assertDep(dependentNodeMap("//a:gen", null), "srcs", "//a:gen.in");
- assertThat(dep.hasStaticConfiguration()).isTrue();
+ assertThat(dep.hasExplicitConfiguration()).isTrue();
assertThat(dep.getConfiguration()).isNull();
}
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/DependencyTest.java b/src/test/java/com/google/devtools/build/lib/analysis/DependencyTest.java
index 4de388c23f..df6541a461 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/DependencyTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/DependencyTest.java
@@ -42,7 +42,7 @@ public class DependencyTest extends AnalysisTestCase {
Dependency nullDep = Dependency.withNullConfiguration(Label.parseAbsolute("//a"));
assertThat(nullDep.getLabel()).isEqualTo(Label.parseAbsolute("//a"));
- assertThat(nullDep.hasStaticConfiguration()).isTrue();
+ assertThat(nullDep.hasExplicitConfiguration()).isTrue();
assertThat(nullDep.getConfiguration()).isNull();
assertThat(nullDep.getAspects().getAllAspects()).isEmpty();
@@ -61,7 +61,7 @@ public class DependencyTest extends AnalysisTestCase {
Dependency.withConfiguration(Label.parseAbsolute("//a"), getTargetConfiguration());
assertThat(targetDep.getLabel()).isEqualTo(Label.parseAbsolute("//a"));
- assertThat(targetDep.hasStaticConfiguration()).isTrue();
+ assertThat(targetDep.hasExplicitConfiguration()).isTrue();
assertThat(targetDep.getConfiguration()).isEqualTo(getTargetConfiguration());
assertThat(targetDep.getAspects().getAllAspects()).isEmpty();
@@ -85,7 +85,7 @@ public class DependencyTest extends AnalysisTestCase {
Label.parseAbsolute("//a"), getTargetConfiguration(), twoAspects);
assertThat(targetDep.getLabel()).isEqualTo(Label.parseAbsolute("//a"));
- assertThat(targetDep.hasStaticConfiguration()).isTrue();
+ assertThat(targetDep.hasExplicitConfiguration()).isTrue();
assertThat(targetDep.getConfiguration()).isEqualTo(getTargetConfiguration());
assertThat(targetDep.getAspects()).isEqualTo(twoAspects);
assertThat(targetDep.getAspectConfiguration(simpleAspect)).isEqualTo(getTargetConfiguration());
@@ -142,7 +142,7 @@ public class DependencyTest extends AnalysisTestCase {
Label.parseAbsolute("//a"), getTargetConfiguration(), aspects, twoAspectMap);
assertThat(targetDep.getLabel()).isEqualTo(Label.parseAbsolute("//a"));
- assertThat(targetDep.hasStaticConfiguration()).isTrue();
+ assertThat(targetDep.hasExplicitConfiguration()).isTrue();
assertThat(targetDep.getConfiguration()).isEqualTo(getTargetConfiguration());
assertThat(targetDep.getAspects().getAllAspects())
.containsExactly(simpleAspect, attributeAspect);
@@ -182,7 +182,7 @@ public class DependencyTest extends AnalysisTestCase {
Label.parseAbsolute("//a"), ConfigurationTransition.HOST, twoAspects);
assertThat(hostDep.getLabel()).isEqualTo(Label.parseAbsolute("//a"));
- assertThat(hostDep.hasStaticConfiguration()).isFalse();
+ assertThat(hostDep.hasExplicitConfiguration()).isFalse();
assertThat(hostDep.getAspects().getAllAspects())
.containsExactlyElementsIn(twoAspects.getAllAspects());
assertThat(hostDep.getTransition()).isEqualTo(ConfigurationTransition.HOST);
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/mock/MOCK_CROSSTOOL b/src/test/java/com/google/devtools/build/lib/analysis/mock/MOCK_CROSSTOOL
index f98f897979..dafa0530f9 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/mock/MOCK_CROSSTOOL
+++ b/src/test/java/com/google/devtools/build/lib/analysis/mock/MOCK_CROSSTOOL
@@ -349,49 +349,6 @@ toolchain {
supports_interface_shared_objects: true
}
-# Stub crosstool to allow construction of apple crosstool configuration in a
-# static configuration set.
-# TODO(b/33804121): Remove this once dynamic configurations are in place.
-toolchain {
- toolchain_identifier: "local_ios"
-
- host_system_name: "local"
- target_system_name: "local"
- target_cpu: "ios_x86_64"
- target_libc: "ios"
- compiler: "compiler"
- linking_mode_flags { mode: DYNAMIC }
-
- abi_version: "local"
- abi_libc_version: "local"
-
- tool_path { name: "ar" path: "/usr/bin/libtool" }
- tool_path { name: "compat-ld" path: "/usr/bin/ld" }
- tool_path { name: "cpp" path: "/usr/bin/cpp" }
- tool_path { name: "dwp" path: "/usr/bin/dwp" }
- tool_path { name: "gcc" path: "/usr/bin/gcc" }
- tool_path { name: "gcov" path: "/usr/bin/gcov" }
- tool_path { name: "ld" path: "/usr/bin/ld" }
- tool_path { name: "nm" path: "/usr/bin/nm" }
- tool_path { name: "objcopy" path: "/usr/bin/objcopy" }
- tool_path { name: "objdump" path: "/usr/bin/objdump" }
- tool_path { name: "strip" path: "/usr/bin/strip" }
-
- needsPic: false
-
- builtin_sysroot: ""
- cxx_flag: "-std=c++0x"
- linker_flag: "-lstdc++"
- cxx_builtin_include_directory: "/usr/include"
- cxx_builtin_include_directory: "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain"
- cxx_builtin_include_directory: "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs"
- cxx_builtin_include_directory: "/opt/local/include"
- cxx_builtin_include_directory: "/Library/Developer/CommandLineTools"
- objcopy_embed_flag: "-I"
- objcopy_embed_flag: "binary"
- supports_interface_shared_objects: true
-}
-
toolchain {
toolchain_identifier: "local_windows_mingw"