Pārlūkot izejas kodu

Xcode 8.1 support

- Add entries to objectivec/DevTools/full_mac_build.sh
- Support `-quiet` via an option on full_mac_build.sh. NOTE: we don't use
  this on travis because the lack of output for a long time could cause travis
  to kill the build (when we get a slow VM).
- Update travis config to use newer images.
Thomas Van Lenten 8 gadi atpakaļ
vecāks
revīzija
2754586fa4
3 mainītis faili ar 25 papildinājumiem un 6 dzēšanām
  1. 1 1
      .travis.yml
  2. 23 4
      objectivec/DevTools/full_mac_build.sh
  3. 1 1
      tests.sh

+ 1 - 1
.travis.yml

@@ -8,7 +8,7 @@ language: cpp
 os:
 os:
   - osx
   - osx
 # The Objective C build needs Xcode 7.0 or later.
 # The Objective C build needs Xcode 7.0 or later.
-osx_image: xcode8
+osx_image: xcode8.1
 script:
 script:
   - ./tests.sh $CONFIG
   - ./tests.sh $CONFIG
 env:
 env:

+ 23 - 4
objectivec/DevTools/full_mac_build.sh

@@ -45,6 +45,8 @@ OPTIONS:
          Skip the invoke of Xcode to test the runtime on OS X.
          Skip the invoke of Xcode to test the runtime on OS X.
    --skip-objc-conformance
    --skip-objc-conformance
          Skip the Objective C conformance tests (run on OS X).
          Skip the Objective C conformance tests (run on OS X).
+   --xcode-quiet
+         Pass -quiet to xcodebuild.
 
 
 EOF
 EOF
 }
 }
@@ -83,6 +85,7 @@ DO_XCODE_OSX_TESTS=yes
 DO_XCODE_DEBUG=yes
 DO_XCODE_DEBUG=yes
 DO_XCODE_RELEASE=yes
 DO_XCODE_RELEASE=yes
 DO_OBJC_CONFORMANCE_TESTS=yes
 DO_OBJC_CONFORMANCE_TESTS=yes
+XCODE_QUIET=no
 while [[ $# != 0 ]]; do
 while [[ $# != 0 ]]; do
   case "${1}" in
   case "${1}" in
     -h | --help )
     -h | --help )
@@ -124,6 +127,9 @@ while [[ $# != 0 ]]; do
     --skip-objc-conformance )
     --skip-objc-conformance )
       DO_OBJC_CONFORMANCE_TESTS=no
       DO_OBJC_CONFORMANCE_TESTS=no
       ;;
       ;;
+    --xcode-quiet )
+      XCODE_QUIET=yes
+      ;;
     -*)
     -*)
       echo "ERROR: Unknown option: ${1}" 1>&2
       echo "ERROR: Unknown option: ${1}" 1>&2
       printUsage
       printUsage
@@ -217,17 +223,21 @@ if ! objectivec/DevTools/pddm.py --dry-run objectivec/*.[hm] objectivec/Tests/*.
   exit 1
   exit 1
 fi
 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
 if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then
   XCODEBUILD_TEST_BASE_IOS=(
   XCODEBUILD_TEST_BASE_IOS=(
     xcodebuild
     xcodebuild
       -project objectivec/ProtocolBuffers_iOS.xcodeproj
       -project objectivec/ProtocolBuffers_iOS.xcodeproj
       -scheme ProtocolBuffers
       -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;
   # Don't need to worry about form factors or retina/non retina;
   # just pick a mix of OS Versions and 32/64 bit.
   # just pick a mix of OS Versions and 32/64 bit.
   # NOTE: Different Xcode have different simulated hardware/os support.
   # 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.
   case "${XCODE_VERSION}" in
   case "${XCODE_VERSION}" in
     6.* )
     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 8.0 or higher." 1>&2
@@ -247,6 +257,14 @@ if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then
           -destination "platform=iOS Simulator,name=iPad Pro (9.7 inch),OS=10.0" # 64bit
           -destination "platform=iOS Simulator,name=iPad Pro (9.7 inch),OS=10.0" # 64bit
       )
       )
       ;;
       ;;
+    8.1* )
+      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=iPad 2,OS=8.1" # 32bit
+          -destination "platform=iOS Simulator,name=iPad Pro (9.7 inch),OS=10.1" # 64bit
+      )
+      ;;
     * )
     * )
       echo "Time to update the simulator targets for Xcode ${XCODE_VERSION}"
       echo "Time to update the simulator targets for Xcode ${XCODE_VERSION}"
       exit 2
       exit 2
@@ -271,8 +289,9 @@ if [[ "${DO_XCODE_OSX_TESTS}" == "yes" ]] ; then
       # Since the ObjC 2.0 Runtime is required, 32bit OS X isn't supported.
       # Since the ObjC 2.0 Runtime is required, 32bit OS X isn't supported.
       -destination "platform=OS X,arch=x86_64" # 64bit
       -destination "platform=OS X,arch=x86_64" # 64bit
   )
   )
-  readonly XCODE_VERSION_LINE="$(xcodebuild -version | grep Xcode\  )"
-  readonly XCODE_VERSION="${XCODE_VERSION_LINE/Xcode /}"  # drop the prefix.
+  if [[ "${XCODE_QUIET}" == "yes" ]] ; then
+    XCODEBUILD_TEST_BASE_OSX+=( -quiet )
+  fi
   case "${XCODE_VERSION}" in
   case "${XCODE_VERSION}" in
     6.* )
     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 8.0 or higher." 1>&2

+ 1 - 1
tests.sh

@@ -89,7 +89,7 @@ build_csharp() {
     echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
     echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
     sudo apt-get update -qq
     sudo apt-get update -qq
     sudo apt-get install -qq mono-devel referenceassemblies-pcl nunit
     sudo apt-get install -qq mono-devel referenceassemblies-pcl nunit
-    
+
     # Then install the dotnet SDK as per Ubuntu 14.04 instructions on dot.net.
     # Then install the dotnet SDK as per Ubuntu 14.04 instructions on dot.net.
     sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
     sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
     sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
     sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893