From 68b5ae3e4c1417364fa6fc8ac64fd599efbea1e4 Mon Sep 17 00:00:00 2001 From: Krunoslav Zaher Date: Mon, 4 Jul 2016 02:48:41 +0200 Subject: [PATCH] Xcode 8.0 fixes. --- scripts/all-tests.sh | 31 +++++++++---------------------- scripts/automation-tests.sh | 4 ++-- scripts/common.sh | 16 +++++++++++----- 3 files changed, 22 insertions(+), 29 deletions(-) diff --git a/scripts/all-tests.sh b/scripts/all-tests.sh index dbc8e929..ef9e933b 100755 --- a/scripts/all-tests.sh +++ b/scripts/all-tests.sh @@ -46,25 +46,12 @@ function checkPlistVersions() { checkPlistVersions -./scripts/validate-headers.swift - -./scripts/package-spm.swift > /dev/null +if [ "${IS_SWIFT_3}" -ne 1 ]; then + ./scripts/validate-headers.swift + ./scripts/package-spm.swift > /dev/null +fi ensureNoGitChanges "Package for Swift package manager isn't updated, please run ./scripts/package-spm.swift and commit the changes" -# ios 7 sim -#if [ `xcrun simctl list | grep "${DEFAULT_IOS7_SIMULATOR}" | wc -l` == 0 ]; then -# xcrun simctl create $DEFAULT_IOS7_SIMULATOR 'iPhone 4s' 'com.apple.CoreSimulator.SimRuntime.iOS-7-1' -#else -# echo "${DEFAULT_IOS7_SIMULATOR} exists" -#fi - -#ios 8 sim -#if [ `xcrun simctl list | grep "${DEFAULT_IOS8_SIMULATOR}" | wc -l` == 0 ]; then -# xcrun simctl create $DEFAULT_IOS8_SIMULATOR 'iPhone 6' 'com.apple.CoreSimulator.SimRuntime.iOS-8-4' -#else -# echo "${DEFAULT_IOS8_SIMULATOR} exists" -#fi - CONFIGURATIONS=(Release-Tests) if [ "${RELEASE_TEST}" -eq 1 ]; then @@ -95,21 +82,21 @@ for scheme in ${WATCH_OS_BUILD_TARGETS[@]} do for configuration in ${CONFIGURATIONS[@]} do - rx "${scheme}" "${configuration}" "${DEFAULT_WATCHOS2_SIMULATOR}" build + rx "${scheme}" "${configuration}" "${DEFAULT_WATCHOS_SIMULATOR}" build done done #make sure all iOS tests pass for configuration in ${CONFIGURATIONS[@]} do - rx "RxSwift-iOS" ${configuration} $DEFAULT_IOS9_SIMULATOR test + rx "RxSwift-iOS" ${configuration} $DEFAULT_IOS_SIMULATOR test done #make sure all watchOS tests pass #tests for Watch OS are not available rdar://21760513 # for configuration in ${CONFIGURATIONS[@]} # do -# rx "RxTests-watchOS" ${configuration} $DEFAULT_WATCHOS2_SIMULATOR test +# rx "RxTests-watchOS" ${configuration} $DEFAULT_WATCHOS_SIMULATOR test # done #make sure all OSX tests pass @@ -123,7 +110,7 @@ for scheme in "RxExample-iOS" do for configuration in ${CONFIGURATIONS[@]} do - rx ${scheme} ${configuration} $DEFAULT_IOS9_SIMULATOR build + rx ${scheme} ${configuration} $DEFAULT_IOS_SIMULATOR build done done @@ -131,7 +118,7 @@ for scheme in "RxExample-iOS" do for configuration in "Debug" do - rx ${scheme} ${configuration} $DEFAULT_IOS9_SIMULATOR test + rx ${scheme} ${configuration} $DEFAULT_IOS_SIMULATOR test done done diff --git a/scripts/automation-tests.sh b/scripts/automation-tests.sh index d7b6ee6f..0e1f3ee8 100755 --- a/scripts/automation-tests.sh +++ b/scripts/automation-tests.sh @@ -85,8 +85,8 @@ function runAutomation() { popd } -AUTOMATION_SIMULATORS=("Krunoslav Zaher’s iPhone" ${DEFAULT_IOS9_SIMULATOR}) -#AUTOMATION_SIMULATORS=(${DEFAULT_IOS9_SIMULATOR}) +AUTOMATION_SIMULATORS=("Krunoslav Zaher’s iPhone" ${DEFAULT_IOS_SIMULATOR}) +#AUTOMATION_SIMULATORS=(${DEFAULT_IOS_SIMULATOR}) IFS="" for simulator in ${AUTOMATION_SIMULATORS[@]} diff --git a/scripts/common.sh b/scripts/common.sh index 6408731b..4af8f869 100755 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -21,11 +21,17 @@ BOLDWHITE="\033[1m\033[37m" # make sure all tests are passing -DEFAULT_IOS7_SIMULATOR=RxSwiftTest/iPhone-4s/iOS/7.1 -DEFAULT_IOS8_SIMULATOR=RxSwiftTest/iPhone-6/iOS/8.4 -DEFAULT_IOS9_SIMULATOR=RxSwiftTest/iPhone-6/iOS/9.3 -DEFAULT_WATCHOS2_SIMULATOR=RxSwiftTest/Apple-Watch-38mm/watchOS/2.2 -DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/9.1 +IS_SWIFT_3=`swift --version | grep "Apple Swift version 3.0" | wc -l` + +if [ "${IS_SWIFT_3}" -eq 1 ]; then + DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-6/iOS/10.0 + DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-38mm/watchOS/3.0 + DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/10.0 +else + DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-6/iOS/9.3 + DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-38mm/watchOS/2.2 + DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/9.1 +fi function runtime_available() { if [ `xcrun simctl list runtimes | grep "${1}" | wc -l` -eq 1 ]; then