diff options
author | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-09-07 15:36:41 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-09-11 08:26:53 +0000 |
commit | 91479d6a3043e823f263545867673d179d0ce237 (patch) | |
tree | 62281497c34e27a183976ebc8435eea75c087d33 | |
parent | 8ccf523018eb369cb104f758e4965aad26cf4fe0 (diff) |
iOS: filter out iWatch devices when running auto tests
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ø <tor.arne.vestbo@theqtcompany.com>
-rwxr-xr-x | mkspecs/macx-ios-clang/ios_destinations.sh | 2 | ||||
-rw-r--r-- | 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 aebf8f6403..e7b13c212c 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 f50010abc1..afe331240b 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)) |