diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2016-05-25 10:05:31 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2016-05-25 10:05:31 -0400 |
commit | d089f04ae53565aff77240172e1007f3959503f4 (patch) | |
tree | 9039a4ce66ad1adc26c022c60214a9ced6e57c97 /tests.sh | |
parent | 5d0c2ee3657d4b530cd547f132f5425debfa0a0e (diff) | |
parent | 368a2f4ceea7611a1c4435a056cf7a44bdcdb16d (diff) | |
download | protobuf-d089f04ae53565aff77240172e1007f3959503f4.tar.gz protobuf-d089f04ae53565aff77240172e1007f3959503f4.tar.bz2 protobuf-d089f04ae53565aff77240172e1007f3959503f4.zip |
Merge pull request #1595 from thomasvl/objc_travis_tweaks
Automated testing tweaks for ObjC
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 61 |
1 files changed, 17 insertions, 44 deletions
@@ -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 | |