aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Philipp Wollermann <philwo@google.com>2016-10-21 13:25:03 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2016-10-21 14:21:42 +0000
commit6446f5250a683bcfe250a8bbc7ffc38357e3216e (patch)
tree9f3b78455eca63b3ff281e7358fa08f0c0cb270c
parent3eef69dbef66371d0d3633a8e5fbbfe9971df961 (diff)
Fix bazel_apple_test and Swift example to work with Xcode 8.0.
This is needed to make Bazel CI green(er) again, because CI machines are being upgraded to macOS Sierra and Xcode 8.0. -- MOS_MIGRATED_REVID=136825401
-rw-r--r--examples/swift/BarLib/mul.swift2
-rwxr-xr-xsrc/test/shell/bazel/apple/bazel_apple_test.sh6
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/swift/BarLib/mul.swift b/examples/swift/BarLib/mul.swift
index 1f1df40512..64d66cdbea 100644
--- a/examples/swift/BarLib/mul.swift
+++ b/examples/swift/BarLib/mul.swift
@@ -2,7 +2,7 @@
public class Multiplier {
public init() {}
- public func multiply(a: Int, _ b: Int) -> Int {
+ public func multiply(_ a: Int, _ b: Int) -> Int {
return a * b
}
}
diff --git a/src/test/shell/bazel/apple/bazel_apple_test.sh b/src/test/shell/bazel/apple/bazel_apple_test.sh
index 9831b319f7..613b5e5107 100755
--- a/src/test/shell/bazel/apple/bazel_apple_test.sh
+++ b/src/test/shell/bazel/apple/bazel_apple_test.sh
@@ -31,8 +31,8 @@ function set_up() {
copy_examples
setup_objc_test_support
- # Find where Xcode 7 (any sub-version will do) is located and get the iOS SDK
- # version it contains.
+ # Find where Xcode 7 or 8 (any sub-version will do) is located and get the iOS
+ # SDK version it contains.
# TODO(b/27267941): This is a hack until the bug is fixed.
rm -rf xcodehelper
mkdir -p xcodehelper
@@ -46,7 +46,7 @@ genrule(
EOF
bazel build xcodehelper:xcode_locations
- XCODE_INFO=$(cat bazel-genfiles/xcodehelper/xcode_locations | grep -m1 7)
+ XCODE_INFO=$(cat bazel-genfiles/xcodehelper/xcode_locations | grep -m1 '7\|8')
XCODE_DIR=$(echo $XCODE_INFO | cut -d ':' -f3)
XCODE_VERSION=$(echo $XCODE_INFO | cut -d ':' -f1)
IOS_SDK_VERSION=$(DEVELOPER_DIR=$XCODE_DIR xcodebuild -sdk -version \