Allow xcodebuild destination specifier to include device sets

Originator:ruenzuo
Number:rdar://32220737 Date Originated:16-May-2017
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 8.3.2
Classification:Enhancement Reproducible:
 
Summary:
The `--set` option in `xcrun simctl` isn't documented anywhere but an Apple employee in the forums described as "will let you choose a path other than ~/Library/Developer/CoreSimulator/Devices as the set of devices that you want to manage" (https://forums.developer.apple.com/thread/13208). This sounds really interesting for continuous integration servers with multiple executors on the same build node, and the option works great for managing simulators, the problem is that xcodebuild doesn't allow to change the default set "~/Library/Developer/CoreSimulator/Devices" to anything else.

It would be great if the destination specifier would allow a set option so we can have more isolation in shared continuous integration environments.

Steps to Reproduce:
# Create a simulator using the set option:
$ xcrun simctl --set "/Users/renzo.crisostomo/Documents/XING/monorepi" create iPhone5s 'iPhone 5s' '10.3'
8E58E0D6-5050-4BAD-82E7-3CDA085F6F82
# Attempt to run tests using that identifier as a destination
$ xcodebuild test-without-building -workspace XING.xcworkspace -scheme XNGFoundation -destination "id=8E58E0D6-5050-4BAD-82E7-3CDA085F6F82"
# Error:
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
		{ id:8E58E0D6-5050-4BAD-82E7-3CDA085F6F82 }

Expected Results:
It would be great if the destination argument would accept something like:
$ xcodebuild test-without-building -workspace XING.xcworkspace -scheme XNGFoundation -destination "id=8E58E0D6-5050-4BAD-82E7-3CDA085F6F82,set=/path/to/set"

Actual Results:
Currently it's not possible to pass the set as part of the destination argument.

Version:
Xcode 8.3.2

Notes:


Configuration:
Xcode 8.3.2, macOS Sierra 10.12.4

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!