diff options
Diffstat (limited to 'mkspecs/features/uikit')
-rwxr-xr-x | mkspecs/features/uikit/device_destinations.sh | 3 | ||||
-rw-r--r-- | mkspecs/features/uikit/xcodebuild.mk | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/mkspecs/features/uikit/device_destinations.sh b/mkspecs/features/uikit/device_destinations.sh index 2c117d0ad4..e87508bed9 100755 --- a/mkspecs/features/uikit/device_destinations.sh +++ b/mkspecs/features/uikit/device_destinations.sh @@ -39,7 +39,8 @@ ## ############################################################################# -booted_simulator=$(xcrun simctl list devices | grep -E '$1' | grep -v unavailable | grep Booted | perl -lne 'print $2 if /\((.*?)\)/') +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +booted_simulator=$($DIR/ios_devices.pl '$1' "Booted" "NOT unavailable" | tail -n 1) echo "SIMULATOR_DEVICES = $booted_simulator" xcodebuild test -scheme $2 -destination 'id=0' -destination-timeout 1 2>&1| sed -n 's/{ \(platform:.*\) }/\1/p' | while read destination; do diff --git a/mkspecs/features/uikit/xcodebuild.mk b/mkspecs/features/uikit/xcodebuild.mk index b8674947fe..057f4f75ac 100644 --- a/mkspecs/features/uikit/xcodebuild.mk +++ b/mkspecs/features/uikit/xcodebuild.mk @@ -56,11 +56,12 @@ simulator-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/device_destinations.mk $(shell $(SPECDIR)/../features/uikit/device_destinations.sh '$(EXPORT_DEVICE_FILTER)' $(TARGET) > $(DESTINATIONS_INCLUDE)) include $(DESTINATIONS_INCLUDE) @@ -71,7 +72,7 @@ endif %-device: DEVICES = $(HARDWARE_DEVICES) GENERIC_DEVICE_DESTINATION := $(EXPORT_GENERIC_DEVICE_DESTINATION) -GENERIC_SIMULATOR_DESTINATION := "id=$(shell xcrun simctl list devices | grep -E '$(EXPORT_DEVICE_FILTER)' | grep -v unavailable | perl -lne 'print $$1 if /\((.*?)\)/' | tail -n 1)" +GENERIC_SIMULATOR_DESTINATION := "id=$(shell $(SPECDIR)/ios_devices.pl '$(EXPORT_DEVICE_FILTER)' "NOT unavailable" | tail -n 1)" %-simulator: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(GENERIC_SIMULATOR_DESTINATION)) %-device: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(GENERIC_DEVICE_DESTINATION)) |