aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Chris Parsons <cparsons@google.com>2015-10-12 19:27:17 +0000
committerGravatar John Field <jfield@google.com>2015-10-13 01:02:20 +0000
commita514b9e96c3801d47318e755303e4131eebde660 (patch)
tree6b5a93af7bd34ab533f3ef1114d79b8ff9c58ab5
parentad3c658b2eb9516a09dbc27df5a91407ac69a457 (diff)
Determine ios sdk version (and pass it to bazel) as part of test setup
-- MOS_MIGRATED_REVID=105235919
-rwxr-xr-xsrc/test/shell/bazel/bazel_example_test.sh2
-rwxr-xr-xsrc/test/shell/bazel/bazel_objc_test.sh7
-rwxr-xr-xsrc/test/shell/bazel/test-setup.sh2
3 files changed, 6 insertions, 5 deletions
diff --git a/src/test/shell/bazel/bazel_example_test.sh b/src/test/shell/bazel/bazel_example_test.sh
index bf1e10d004..1596431479 100755
--- a/src/test/shell/bazel/bazel_example_test.sh
+++ b/src/test/shell/bazel/bazel_example_test.sh
@@ -107,7 +107,7 @@ if [ "${PLATFORM}" = "darwin" ]; then
# prevents us from running iOS tests.
# TODO(bazel-team): Execute iOStests here when this issue is resolved.
assert_build_output ./bazel-bin/examples/objc/PrenotCalculator.ipa \
- //examples/objc:PrenotCalculator
+ --ios_sdk_version=$IOS_SDK_VERSION //examples/objc:PrenotCalculator
}
fi
diff --git a/src/test/shell/bazel/bazel_objc_test.sh b/src/test/shell/bazel/bazel_objc_test.sh
index ced986207c..2b00798e5d 100755
--- a/src/test/shell/bazel/bazel_objc_test.sh
+++ b/src/test/shell/bazel/bazel_objc_test.sh
@@ -104,7 +104,7 @@ function test_build_app() {
setup_objc_test_support
make_app
- bazel build --verbose_failures \
+ bazel build --verbose_failures --ios_sdk_version=$IOS_SDK_VERSION \
//ios:app >$TEST_log 2>&1 || fail "should pass"
ls bazel-bin/ios/app.xcodeproj || fail "should generate app.xcodeproj"
ls bazel-bin/ios/app.ipa || fail "should generate app.ipa"
@@ -114,8 +114,8 @@ function test_ios_test() {
setup_objc_test_support
make_app
- bazel build --test_output=all //ios:PassingXcTest >$TEST_log 2>&1 \
- || fail "should pass"
+ bazel build --test_output=all --ios_sdk_version=$IOS_SDK_VERSION \
+ //ios:PassingXcTest >$TEST_log 2>&1 || fail "should pass"
ls bazel-bin/ios/PassingXcTest.xcodeproj \
|| fail "should generate PassingXcTest.xcodeproj"
ls bazel-bin/ios/PassingXcTest.ipa \
@@ -126,7 +126,6 @@ function test_valid_ios_sdk_version() {
setup_objc_test_support
make_app
- IOS_SDK_VERSION=$(xcrun --sdk iphoneos --show-sdk-version)
bazel build --verbose_failures --ios_sdk_version=$IOS_SDK_VERSION \
//ios:app >$TEST_log 2>&1 || fail "should pass"
ls bazel-bin/ios/app.xcodeproj || fail "should generate app.xcodeproj"
diff --git a/src/test/shell/bazel/test-setup.sh b/src/test/shell/bazel/test-setup.sh
index cddaf9c90e..3219a8013b 100755
--- a/src/test/shell/bazel/test-setup.sh
+++ b/src/test/shell/bazel/test-setup.sh
@@ -335,6 +335,8 @@ function setup_objc_test_support() {
[ -e tools/objc/environment_plist.sh ] || ln -sv ${environment_plist_path} tools/objc/environment_plist.sh
[ -e third_party/iossim/iossim ] || setup_iossim
+
+ IOS_SDK_VERSION=$(xcrun --sdk iphoneos --show-sdk-version)
}
workspaces=()