From 91479d6a3043e823f263545867673d179d0ce237 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 7 Sep 2015 15:36:41 +0200 Subject: [PATCH] iOS: filter out iWatch devices when running auto tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When using Xcode7 (beta 6) "xcrun simctl list devices" will also list iWatch devices. So we need to filter them out so we don't end up picking one when building and running auto tests. This will fix a build failure when building Qt with latest Xcode7. Change-Id: Ie40489d670298ec75332a6c2b54565d55e9dbbba Reviewed-by: Tor Arne Vestbø --- mkspecs/macx-ios-clang/ios_destinations.sh | 2 +- mkspecs/macx-ios-clang/xcodebuild.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/macx-ios-clang/ios_destinations.sh b/mkspecs/macx-ios-clang/ios_destinations.sh index aebf8f6403d..e7b13c212c3 100755 --- a/mkspecs/macx-ios-clang/ios_destinations.sh +++ b/mkspecs/macx-ios-clang/ios_destinations.sh @@ -33,7 +33,7 @@ ## ############################################################################# -booted_simulator=$(xcrun simctl list devices | grep -v unavailable | grep Booted | perl -lne 'print $1 if /\((.*?)\)/') +booted_simulator=$(xcrun simctl list devices | grep -E "iPhone|iPad" | grep -v unavailable | grep Booted | perl -lne 'print $1 if /\((.*?)\)/') echo "IPHONESIMULATOR_DEVICES = $booted_simulator" xcodebuild test -scheme $1 -destination 'id=0' -destination-timeout 1 2>&1| sed -n 's/{ \(platform:.*\) }/\1/p' | while read destination; do diff --git a/mkspecs/macx-ios-clang/xcodebuild.mk b/mkspecs/macx-ios-clang/xcodebuild.mk index f50010abc1d..afe331240b7 100644 --- a/mkspecs/macx-ios-clang/xcodebuild.mk +++ b/mkspecs/macx-ios-clang/xcodebuild.mk @@ -67,7 +67,7 @@ endif %-iphoneos: DEVICES = $(IPHONEOS_DEVICES) IPHONEOS_GENERIC_DESTINATION := "generic/platform=iOS" -IPHONESIMULATOR_GENERIC_DESTINATION := "id=$(shell xcrun simctl list devices | grep -v unavailable | perl -lne 'print $$1 if /\((.*?)\)/' | tail -n 1)" +IPHONESIMULATOR_GENERIC_DESTINATION := "id=$(shell xcrun simctl list devices | grep -E 'iPhone|iPad' | grep -v unavailable | perl -lne 'print $$1 if /\((.*?)\)/' | tail -n 1)" DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(value $(call toupper,$(call basesdk,$(SDK)))_GENERIC_DESTINATION))