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>
This commit is contained in:
parent
8ccf523018
commit
91479d6a30
@ -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
|
||||
|
@ -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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user