| Index: third_party/protobuf/objectivec/DevTools/full_mac_build.sh
|
| diff --git a/third_party/protobuf/objectivec/DevTools/full_mac_build.sh b/third_party/protobuf/objectivec/DevTools/full_mac_build.sh
|
| index ef8fb74089d6e16fe41e49ada4d1cdbcb8871627..ff51d9f01699a1d716500212f19a916a93dfefe5 100755
|
| --- a/third_party/protobuf/objectivec/DevTools/full_mac_build.sh
|
| +++ b/third_party/protobuf/objectivec/DevTools/full_mac_build.sh
|
| @@ -37,16 +37,10 @@ OPTIONS:
|
| Skip the invoke of Xcode to test the runtime on both iOS and OS X.
|
| --skip-xcode-ios
|
| Skip the invoke of Xcode to test the runtime on iOS.
|
| - --skip-xcode-debug
|
| - Skip the Xcode Debug configuration.
|
| - --skip-xcode-release
|
| - Skip the Xcode Release configuration.
|
| --skip-xcode-osx
|
| Skip the invoke of Xcode to test the runtime on OS X.
|
| --skip-objc-conformance
|
| Skip the Objective C conformance tests (run on OS X).
|
| - --xcode-quiet
|
| - Pass -quiet to xcodebuild.
|
|
|
| EOF
|
| }
|
| @@ -72,8 +66,8 @@ wrapped_make() {
|
| }
|
|
|
| NUM_MAKE_JOBS=$(/usr/sbin/sysctl -n hw.ncpu)
|
| -if [[ "${NUM_MAKE_JOBS}" -lt 2 ]] ; then
|
| - NUM_MAKE_JOBS=2
|
| +if [[ "${NUM_MAKE_JOBS}" -lt 4 ]] ; then
|
| + NUM_MAKE_JOBS=4
|
| fi
|
|
|
| DO_AUTOGEN=no
|
| @@ -82,10 +76,7 @@ REGEN_DESCRIPTORS=no
|
| CORE_ONLY=no
|
| DO_XCODE_IOS_TESTS=yes
|
| DO_XCODE_OSX_TESTS=yes
|
| -DO_XCODE_DEBUG=yes
|
| -DO_XCODE_RELEASE=yes
|
| DO_OBJC_CONFORMANCE_TESTS=yes
|
| -XCODE_QUIET=no
|
| while [[ $# != 0 ]]; do
|
| case "${1}" in
|
| -h | --help )
|
| @@ -118,18 +109,9 @@ while [[ $# != 0 ]]; do
|
| --skip-xcode-osx )
|
| DO_XCODE_OSX_TESTS=no
|
| ;;
|
| - --skip-xcode-debug )
|
| - DO_XCODE_DEBUG=no
|
| - ;;
|
| - --skip-xcode-release )
|
| - DO_XCODE_RELEASE=no
|
| - ;;
|
| --skip-objc-conformance )
|
| DO_OBJC_CONFORMANCE_TESTS=no
|
| ;;
|
| - --xcode-quiet )
|
| - XCODE_QUIET=yes
|
| - ;;
|
| -*)
|
| echo "ERROR: Unknown option: ${1}" 1>&2
|
| printUsage
|
| @@ -169,12 +151,8 @@ if [[ "${DO_CLEAN}" == "yes" ]] ; then
|
| -project objectivec/ProtocolBuffers_iOS.xcodeproj
|
| -scheme ProtocolBuffers
|
| )
|
| - if [[ "${DO_XCODE_DEBUG}" == "yes" ]] ; then
|
| - "${XCODEBUILD_CLEAN_BASE_IOS[@]}" -configuration Debug clean
|
| - fi
|
| - if [[ "${DO_XCODE_RELEASE}" == "yes" ]] ; then
|
| - "${XCODEBUILD_CLEAN_BASE_IOS[@]}" -configuration Release clean
|
| - fi
|
| + "${XCODEBUILD_CLEAN_BASE_IOS[@]}" -configuration Debug clean
|
| + "${XCODEBUILD_CLEAN_BASE_IOS[@]}" -configuration Release clean
|
| fi
|
| if [[ "${DO_XCODE_OSX_TESTS}" == "yes" ]] ; then
|
| XCODEBUILD_CLEAN_BASE_OSX=(
|
| @@ -182,12 +160,8 @@ if [[ "${DO_CLEAN}" == "yes" ]] ; then
|
| -project objectivec/ProtocolBuffers_OSX.xcodeproj
|
| -scheme ProtocolBuffers
|
| )
|
| - if [[ "${DO_XCODE_DEBUG}" == "yes" ]] ; then
|
| - "${XCODEBUILD_CLEAN_BASE_OSX[@]}" -configuration Debug clean
|
| - fi
|
| - if [[ "${DO_XCODE_RELEASE}" == "yes" ]] ; then
|
| - "${XCODEBUILD_CLEAN_BASE_OSX[@]}" -configuration Release clean
|
| - fi
|
| + "${XCODEBUILD_CLEAN_BASE_OSX[@]}" -configuration Debug clean
|
| + "${XCODEBUILD_CLEAN_BASE_OSX[@]}" -configuration Release clean
|
| fi
|
| fi
|
|
|
| @@ -223,46 +197,45 @@ if ! objectivec/DevTools/pddm.py --dry-run objectivec/*.[hm] objectivec/Tests/*.
|
| exit 1
|
| fi
|
|
|
| -readonly XCODE_VERSION_LINE="$(xcodebuild -version | grep Xcode\ )"
|
| -readonly XCODE_VERSION="${XCODE_VERSION_LINE/Xcode /}" # drop the prefix.
|
| -
|
| if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then
|
| XCODEBUILD_TEST_BASE_IOS=(
|
| xcodebuild
|
| -project objectivec/ProtocolBuffers_iOS.xcodeproj
|
| -scheme ProtocolBuffers
|
| )
|
| - if [[ "${XCODE_QUIET}" == "yes" ]] ; then
|
| - XCODEBUILD_TEST_BASE_IOS+=( -quiet )
|
| - fi
|
| # Don't need to worry about form factors or retina/non retina;
|
| # just pick a mix of OS Versions and 32/64 bit.
|
| # NOTE: Different Xcode have different simulated hardware/os support.
|
| + readonly XCODE_VERSION_LINE="$(xcodebuild -version | grep Xcode\ )"
|
| + readonly XCODE_VERSION="${XCODE_VERSION_LINE/Xcode /}" # drop the prefix.
|
| + IOS_SIMULATOR_NAME="Simulator"
|
| case "${XCODE_VERSION}" in
|
| 6.* )
|
| - echo "ERROR: Xcode 6.3/6.4 no longer supported for building, please use 8.0 or higher." 1>&2
|
| + echo "ERROR: Xcode 6.3/6.4 no longer supported for building, please use 7.0 or higher." 1>&2
|
| exit 10
|
| ;;
|
| - 7.* )
|
| - echo "ERROR: The unittests include Swift code that is now Swift 3.0." 1>&2
|
| - echo "ERROR: Xcode 8.0 or higher is required to build the test suite, but the library works with Xcode 7.x." 1>&2
|
| - exit 11
|
| + 7.1* )
|
| + XCODEBUILD_TEST_BASE_IOS+=(
|
| + -destination "platform=iOS Simulator,name=iPhone 4s,OS=8.1" # 32bit
|
| + -destination "platform=iOS Simulator,name=iPhone 6,OS=9.0" # 64bit
|
| + -destination "platform=iOS Simulator,name=iPad 2,OS=8.1" # 32bit
|
| + -destination "platform=iOS Simulator,name=iPad Air,OS=9.0" # 64bit
|
| + )
|
| ;;
|
| - 8.0* )
|
| - # The 8.* device seem to hang and never start under Xcode 8.
|
| + 7.3* )
|
| XCODEBUILD_TEST_BASE_IOS+=(
|
| - -destination "platform=iOS Simulator,name=iPhone 4s,OS=9.0" # 32bit
|
| - -destination "platform=iOS Simulator,name=iPhone 7,OS=10.0" # 64bit
|
| - -destination "platform=iOS Simulator,name=iPad 2,OS=9.0" # 32bit
|
| - -destination "platform=iOS Simulator,name=iPad Pro (9.7 inch),OS=10.0" # 64bit
|
| + -destination "platform=iOS Simulator,name=iPhone 4s,OS=8.1" # 32bit
|
| + -destination "platform=iOS Simulator,name=iPhone 6,OS=9.3" # 64bit
|
| + -destination "platform=iOS Simulator,name=iPad 2,OS=8.1" # 32bit
|
| + -destination "platform=iOS Simulator,name=iPad Air,OS=9.3" # 64bit
|
| )
|
| ;;
|
| - 8.1* )
|
| + 7.* )
|
| XCODEBUILD_TEST_BASE_IOS+=(
|
| -destination "platform=iOS Simulator,name=iPhone 4s,OS=8.1" # 32bit
|
| - -destination "platform=iOS Simulator,name=iPhone 7,OS=10.1" # 64bit
|
| + -destination "platform=iOS Simulator,name=iPhone 6,OS=9.2" # 64bit
|
| -destination "platform=iOS Simulator,name=iPad 2,OS=8.1" # 32bit
|
| - -destination "platform=iOS Simulator,name=iPad Pro (9.7 inch),OS=10.1" # 64bit
|
| + -destination "platform=iOS Simulator,name=iPad Air,OS=9.2" # 64bit
|
| )
|
| ;;
|
| * )
|
| @@ -270,16 +243,12 @@ if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then
|
| exit 2
|
| ;;
|
| esac
|
| - if [[ "${DO_XCODE_DEBUG}" == "yes" ]] ; then
|
| - header "Doing Xcode iOS build/tests - Debug"
|
| - "${XCODEBUILD_TEST_BASE_IOS[@]}" -configuration Debug test
|
| - fi
|
| - if [[ "${DO_XCODE_RELEASE}" == "yes" ]] ; then
|
| - header "Doing Xcode iOS build/tests - Release"
|
| - "${XCODEBUILD_TEST_BASE_IOS[@]}" -configuration Release test
|
| - fi
|
| + header "Doing Xcode iOS build/tests - Debug"
|
| + "${XCODEBUILD_TEST_BASE_IOS[@]}" -configuration Debug test
|
| + header "Doing Xcode iOS build/tests - Release"
|
| + "${XCODEBUILD_TEST_BASE_IOS[@]}" -configuration Release test
|
| # Don't leave the simulator in the developer's face.
|
| - killall Simulator
|
| + killall "${IOS_SIMULATOR_NAME}"
|
| fi
|
| if [[ "${DO_XCODE_OSX_TESTS}" == "yes" ]] ; then
|
| XCODEBUILD_TEST_BASE_OSX=(
|
| @@ -289,32 +258,13 @@ if [[ "${DO_XCODE_OSX_TESTS}" == "yes" ]] ; then
|
| # Since the ObjC 2.0 Runtime is required, 32bit OS X isn't supported.
|
| -destination "platform=OS X,arch=x86_64" # 64bit
|
| )
|
| - if [[ "${XCODE_QUIET}" == "yes" ]] ; then
|
| - XCODEBUILD_TEST_BASE_OSX+=( -quiet )
|
| - fi
|
| - case "${XCODE_VERSION}" in
|
| - 6.* )
|
| - echo "ERROR: Xcode 6.3/6.4 no longer supported for building, please use 8.0 or higher." 1>&2
|
| - exit 10
|
| - ;;
|
| - 7.* )
|
| - echo "ERROR: The unittests include Swift code that is now Swift 3.0." 1>&2
|
| - echo "ERROR: Xcode 8.0 or higher is required to build the test suite, but the library works with Xcode 7.x." 1>&2
|
| - exit 11
|
| - ;;
|
| - esac
|
| - if [[ "${DO_XCODE_DEBUG}" == "yes" ]] ; then
|
| - header "Doing Xcode OS X build/tests - Debug"
|
| - "${XCODEBUILD_TEST_BASE_OSX[@]}" -configuration Debug test
|
| - fi
|
| - if [[ "${DO_XCODE_RELEASE}" == "yes" ]] ; then
|
| - header "Doing Xcode OS X build/tests - Release"
|
| - "${XCODEBUILD_TEST_BASE_OSX[@]}" -configuration Release test
|
| - fi
|
| + header "Doing Xcode OS X build/tests - Debug"
|
| + "${XCODEBUILD_TEST_BASE_OSX[@]}" -configuration Debug test
|
| + header "Doing Xcode OS X build/tests - Release"
|
| + "${XCODEBUILD_TEST_BASE_OSX[@]}" -configuration Release test
|
| fi
|
|
|
| if [[ "${DO_OBJC_CONFORMANCE_TESTS}" == "yes" ]] ; then
|
| - header "Running ObjC Conformance Tests"
|
| cd conformance
|
| wrapped_make -j "${NUM_MAKE_JOBS}" test_objc
|
| cd ..
|
|
|