aboutsummaryrefslogtreecommitdiff
path: root/tests.sh
diff options
context:
space:
mode:
authorThomas Van Lenten <thomasvl@google.com>2016-05-24 11:27:33 -0400
committerThomas Van Lenten <thomasvl@google.com>2016-05-24 15:39:36 -0400
commit368a2f4ceea7611a1c4435a056cf7a44bdcdb16d (patch)
tree6f1d5d408bd814d94097eb13936ea939d80cf51a /tests.sh
parent2131b2d544bf6eeb789c128ef3e9e04fc299237a (diff)
downloadprotobuf-368a2f4ceea7611a1c4435a056cf7a44bdcdb16d.tar.gz
protobuf-368a2f4ceea7611a1c4435a056cf7a44bdcdb16d.tar.bz2
protobuf-368a2f4ceea7611a1c4435a056cf7a44bdcdb16d.zip
Automated testing tweaks for ObjC
- Move the ObjC tests into the list and exclude them on linux, this will change where in the order they start, since they are longer, it will have other things run in parallel instead of them ending up last and taking the longest. - Switch to the Xcode 7.3 image. - Drop the use of xctool and stream line things through the full_mac_build.sh script. This means we end up with only one build script instead of two. - Tweaks to the mac build script: - Make iOS Xcode version support explicit - Support Debug/Release only building - Change the OS X min parallel count to 2 to better deal with VMs. - Split the travis ios tests into the two Xcode Configurations as the logs are choking travis.
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh61
1 files changed, 17 insertions, 44 deletions
diff --git a/tests.sh b/tests.sh
index 6a9439a5..cde108fd 100755
--- a/tests.sh
+++ b/tests.sh
@@ -197,59 +197,30 @@ internal_install_python_deps() {
fi
}
-internal_objectivec_common () {
- # Make sure xctool is up to date. Adapted from
- # http://docs.travis-ci.com/user/osx-ci-environment/
- # We don't use a before_install because we test multiple OSes.
- brew update
- brew outdated xctool || brew upgrade xctool
+build_objectivec_ios() {
# Reused the build script that takes care of configuring and ensuring things
- # are up to date. Xcode and conformance tests will be directly invoked.
+ # are up to date. The OS X test runs the objc conformance test, so skip it
+ # here.
+ # Note: travis has xctool installed, and we've looked at using it in the past
+ # but it has ended up proving unreliable (bugs), an they are removing build
+ # support in favor of xcbuild (or just xcodebuild).
objectivec/DevTools/full_mac_build.sh \
- --core-only --skip-xcode --skip-objc-conformance
+ --core-only --skip-xcode-osx --skip-objc-conformance "$@"
}
-internal_xctool_debug_and_release() {
- # Always use -reporter plain to avoid escape codes in output (makes travis
- # logs easier to read).
- xctool -reporter plain -configuration Debug "$@"
- xctool -reporter plain -configuration Release "$@"
+build_objectivec_ios_debug() {
+ build_objectivec_ios --skip-xcode-release
}
-build_objectivec_ios() {
- internal_objectivec_common
- # https://github.com/facebook/xctool/issues/509 - unlike xcodebuild, xctool
- # doesn't support >1 destination, so we have to build first and then run the
- # tests one destination at a time.
- internal_xctool_debug_and_release \
- -project objectivec/ProtocolBuffers_iOS.xcodeproj \
- -scheme ProtocolBuffers \
- -sdk iphonesimulator \
- build-tests
- IOS_DESTINATIONS=(
- "platform=iOS Simulator,name=iPhone 4s,OS=8.1" # 32bit
- "platform=iOS Simulator,name=iPhone 6,OS=9.2" # 64bit
- "platform=iOS Simulator,name=iPad 2,OS=8.1" # 32bit
- "platform=iOS Simulator,name=iPad Air,OS=9.2" # 64bit
- )
- for i in "${IOS_DESTINATIONS[@]}" ; do
- internal_xctool_debug_and_release \
- -project objectivec/ProtocolBuffers_iOS.xcodeproj \
- -scheme ProtocolBuffers \
- -sdk iphonesimulator \
- -destination "${i}" \
- run-tests
- done
+build_objectivec_ios_release() {
+ build_objectivec_ios --skip-xcode-debug
}
build_objectivec_osx() {
- internal_objectivec_common
- internal_xctool_debug_and_release \
- -project objectivec/ProtocolBuffers_OSX.xcodeproj \
- -scheme ProtocolBuffers \
- -destination "platform=OS X,arch=x86_64" \
- test
- cd conformance && make test_objc && cd ..
+ # Reused the build script that takes care of configuring and ensuring things
+ # are up to date.
+ objectivec/DevTools/full_mac_build.sh \
+ --core-only --skip-xcode-ios
}
build_python() {
@@ -330,6 +301,8 @@ Usage: $0 { cpp |
javanano_jdk7 |
javanano_oracle7 |
objectivec_ios |
+ objectivec_ios_debug |
+ objectivec_ios_release |
objectivec_osx |
python |
python_cpp |