diff options
author | gregce <gregce@google.com> | 2017-09-12 23:58:34 +0200 |
---|---|---|
committer | Philipp Wollermann <philwo@google.com> | 2017-09-13 19:06:29 +0200 |
commit | e0bbe757b3626fbbadbab798e6752ca086e9ff46 (patch) | |
tree | 7d58994baa09bdce6be8df4276e15d31aac9d057 /src/test/java/com/google/devtools | |
parent | 93d65a4473c9c963a190b433f359ef7e52273bd4 (diff) |
Remove outdated references to static vs. dynamic configurations.
PiperOrigin-RevId: 168452997
Diffstat (limited to 'src/test/java/com/google/devtools')
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" |