diff options
author | 2017-12-21 01:19:47 -0800 | |
---|---|---|
committer | 2017-12-21 01:21:41 -0800 | |
commit | d4e3ce6531c60b08085d2d2fcb76b2b141b6e77d (patch) | |
tree | e3e301a49c1f3d7fdf606167a8ba6c13fb0652f5 /src/test/java/com/google/devtools/build | |
parent | 8268c56e27494d345077720e129fda05c40b0514 (diff) |
Remove xcode_toolchain flag
PiperOrigin-RevId: 179785531
Diffstat (limited to 'src/test/java/com/google/devtools/build')
3 files changed, 13 insertions, 55 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/apple/AppleConfigurationSerializationTest.java b/src/test/java/com/google/devtools/build/lib/rules/apple/AppleConfigurationSerializationTest.java index 27d8987166..c0a69921fc 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/apple/AppleConfigurationSerializationTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/apple/AppleConfigurationSerializationTest.java @@ -78,7 +78,6 @@ public class AppleConfigurationSerializationTest firstOptions.defaultProvisioningProfile = Label.parseAbsoluteUnchecked("//default/provisioning"); firstOptions.xcodeVersionConfig = Label.parseAbsoluteUnchecked("//xcode/version:config"); - firstOptions.xcodeToolchain = "xcodeToolchain1"; firstOptions.appleBitcodeMode = AppleCommandLineOptions.AppleBitcodeMode.EMBEDDED_MARKERS; firstOptions.enableAppleCrosstoolTransition = false; firstOptions.targetUsesAppleCrosstool = true; diff --git a/src/test/java/com/google/devtools/build/lib/rules/objc/IosTestTest.java b/src/test/java/com/google/devtools/build/lib/rules/objc/IosTestTest.java index 047aadb6b6..a0927fad67 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/objc/IosTestTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/objc/IosTestTest.java @@ -358,18 +358,6 @@ public class IosTestTest extends ObjcRuleTestCase { } @Test - public void testRegistersSwiftStdlibActionsWithToolchain() throws Exception { - useConfiguration("--xcode_toolchain=test_toolchain"); - checkRegisterSwiftStdlibActions(RULE_TYPE, "iphonesimulator", "test_toolchain"); - } - - @Test - public void testRegistersSwiftSupportActionsWithToolchain() throws Exception { - useConfiguration("--xcode_toolchain=test_toolchain"); - checkRegisterSwiftSupportActions(RULE_TYPE, "iphonesimulator", "test_toolchain"); - } - - @Test public void testAddsStoryboardZipsToFilesToBuild() throws Exception { ConfiguredTarget target = createTargetWithStoryboards(RULE_TYPE); diff --git a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcRuleTestCase.java b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcRuleTestCase.java index 37b2013b57..a6fccfd4a9 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcRuleTestCase.java +++ b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcRuleTestCase.java @@ -35,7 +35,7 @@ import static com.google.devtools.build.lib.rules.objc.ObjcRuleClasses.ReleaseBu import static com.google.devtools.build.lib.rules.objc.ObjcRuleClasses.SRCS_TYPE; import static com.google.devtools.build.lib.rules.objc.ObjcRuleClasses.STRIP; import static com.google.devtools.build.lib.rules.objc.ReleaseBundlingSupport.NO_ASSET_CATALOG_ERROR_FORMAT; -import static org.junit.Assert.fail; +import static com.google.devtools.build.lib.testutil.MoreAsserts.expectThrows; import com.dd.plist.NSDictionary; import com.dd.plist.PropertyListParser; @@ -2176,8 +2176,7 @@ public abstract class ObjcRuleTestCase extends BuildViewTestCase { ConfiguredTarget target, String platformName, String zipName, - String bundlePath, - String toolchain) + String bundlePath) throws Exception { String zipArtifactName = String.format("%s.%s.zip", target.getTarget().getName(), zipName); Artifact swiftLibsZip = getBinArtifact(zipArtifactName, target); @@ -2191,10 +2190,6 @@ public abstract class ObjcRuleTestCase extends BuildViewTestCase { CustomCommandLine.Builder expectedCommandLine = CustomCommandLine.builder().addDynamicString(MOCK_SWIFTSTDLIBTOOLWRAPPER_PATH); - if (toolchain != null) { - expectedCommandLine.add("--toolchain", toolchain); - } - expectedCommandLine .addExecPath("--output_zip_path", swiftLibsZip) .add("--bundle_path", bundlePath) @@ -2205,45 +2200,24 @@ public abstract class ObjcRuleTestCase extends BuildViewTestCase { } protected void checkRegisterSwiftSupportActions( - RuleType ruleType, String platformName, String toolchain) throws Exception { - checkRegisterSwiftSupportActions(createTargetWithSwift(ruleType), platformName, toolchain); - } - - protected void checkRegisterSwiftSupportActions( RuleType ruleType, String platformName) throws Exception { - checkRegisterSwiftSupportActions(createTargetWithSwift(ruleType), platformName, null); - } - - protected void checkRegisterSwiftSupportActions( - ConfiguredTarget target, String platformName, String toolchain) throws Exception { - assertSwiftStdlibToolAction( - target, platformName, "swiftsupport", "SwiftSupport/" + platformName, toolchain); + checkRegisterSwiftSupportActions(createTargetWithSwift(ruleType), platformName); } protected void checkRegisterSwiftSupportActions( ConfiguredTarget target, String platformName) throws Exception { assertSwiftStdlibToolAction( - target, platformName, "swiftsupport", "SwiftSupport/" + platformName, null); - } - - protected void checkRegisterSwiftStdlibActions( - RuleType ruleType, String platformName, String toolchain) throws Exception { - checkRegisterSwiftStdlibActions(createTargetWithSwift(ruleType), platformName, toolchain); + target, platformName, "swiftsupport", "SwiftSupport/" + platformName); } protected void checkRegisterSwiftStdlibActions( RuleType ruleType, String platformName) throws Exception { - checkRegisterSwiftStdlibActions(createTargetWithSwift(ruleType), platformName, null); - } - - protected void checkRegisterSwiftStdlibActions( - ConfiguredTarget target, String platformName, String toolchain) throws Exception { - assertSwiftStdlibToolAction(target, platformName, "swiftstdlib", "Frameworks", toolchain); + checkRegisterSwiftStdlibActions(createTargetWithSwift(ruleType), platformName); } protected void checkRegisterSwiftStdlibActions( ConfiguredTarget target, String platformName) throws Exception { - assertSwiftStdlibToolAction(target, platformName, "swiftstdlib", "Frameworks", null); + assertSwiftStdlibToolAction(target, platformName, "swiftstdlib", "Frameworks"); } /** @@ -2854,16 +2828,13 @@ public abstract class ObjcRuleTestCase extends BuildViewTestCase { "--ios_multi_cpus=i386,x86_64,armv7,arm64", "--watchos_cpus=armv7k", "--cpu=ios_armv7"); ruleTypePair.scratchTargets(scratch); - try { - getConfiguredTarget("//x:x"); - fail("Multiplatform binary should have failed"); - } catch (AssertionError expected) { - assertThat(expected) - .hasMessageThat() - .contains( - "--ios_multi_cpus does not currently allow values for both simulator and device " - + "builds."); - } + AssertionError expected = + expectThrows(AssertionError.class, () -> getConfiguredTarget("//x:x")); + assertThat(expected) + .hasMessageThat() + .contains( + "--ios_multi_cpus does not currently allow values for both simulator and device " + + "builds."); } protected void checkMultiCpuResourceInheritance(BinaryRuleTypePair ruleTypePair) |