summaryrefslogtreecommitdiffstats
path: root/mkspecs/macx-ios-clang/xcodebuild.mk
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2016-07-25 14:02:43 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2016-08-24 13:05:09 +0000
commit86ebd92addfcb6168875351f5af2fab89be3730f (patch)
treebf282e00b94aaff03ddd781c1e24d90f8c357041 /mkspecs/macx-ios-clang/xcodebuild.mk
parent0f8c2ab3d89dd49d89ae53cfefa83e38ea3c3c17 (diff)
iOS, mkspec: update UUID parsing to support Xcode 8 beta
"simctl list devices" has changed output format in Xcode 8 beta to include additional information placed inside parentheses for each device. And this confuses the scripts we use to parse and find UUIDs. Instead of making the inline scripts even longer and more complex, this patch will factor most of it out to a separate perl script that reads out device information on json format and parses the UUID. Change-Id: I3cd4dc276ecda030fda1932073c8bf1e0bc85deb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'mkspecs/macx-ios-clang/xcodebuild.mk')
-rw-r--r--mkspecs/macx-ios-clang/xcodebuild.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/mkspecs/macx-ios-clang/xcodebuild.mk b/mkspecs/macx-ios-clang/xcodebuild.mk
index 1bd18430df..bf6b791368 100644
--- a/mkspecs/macx-ios-clang/xcodebuild.mk
+++ b/mkspecs/macx-ios-clang/xcodebuild.mk
@@ -56,11 +56,12 @@ iphonesimulator-install: ACTION = build
release-%: CONFIGURATION = Release
debug-%: CONFIGURATION = Debug
+SPECDIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
# Test and build (device) destinations
ifneq ($(filter check%,$(MAKECMDGOALS)),)
ifeq ($(DEVICES),)
$(info Enumerating test destinations (you may override this by setting DEVICES explicitly), please wait...)
- SPECDIR := $(dir $(lastword $(MAKEFILE_LIST)))
DESTINATIONS_INCLUDE = /tmp/ios_destinations.mk
$(shell $(SPECDIR)/ios_destinations.sh $(TARGET) > $(DESTINATIONS_INCLUDE))
include $(DESTINATIONS_INCLUDE)
@@ -71,7 +72,7 @@ endif
%-iphoneos: DEVICES = $(IPHONEOS_DEVICES)
IPHONEOS_GENERIC_DESTINATION := "generic/platform=iOS"
-IPHONESIMULATOR_GENERIC_DESTINATION := "id=$(shell xcrun simctl list devices | grep -E 'iPhone|iPad' | grep -v unavailable | perl -lne 'print $$1 if /\((.*?)\)/' | tail -n 1)"
+IPHONESIMULATOR_GENERIC_DESTINATION := "id=$(shell $(SPECDIR)/ios_devices.pl "iPhone|iPad" "NOT unavailable" | tail -n 1)"
DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(value $(call toupper,$(call basesdk,$(SDK)))_GENERIC_DESTINATION))