Xcode 6: xcodebuild fails to run unit tests in iOS Simulator

Originator:ben.kennedy
Number:rdar://18311014 Date Originated:11-Sep-2014 02:11 PM
Status:Open Resolved:
Product:Developer Tools Product Version:6.0 (6A313)
Classification:Other Bug Reproducible:Always
 
Summary:
Attempts to run unit tests via the command line fail if the parent process originates from ssh.

This manifests with unit tests being invoked by Jenkins, where the Mac is a build slave running the slave.jar invoked by the Jenkins master via ssh. The failure is observed even when the same user is also interactively logged in to the machine. I can see the Java process in the dock, and prior to Xcode 6, I could sit here and watch the Simulator fire up when the tests ran.

Steps to Reproduce:
1. ssh into the Mac from another machine.
2. Attempt to build and test an iOS target using xcodebuild:

xcodebuild -workspace ./Kashoo.xcworkspace -scheme 'Kashoo Dev' -destination 'platform=iOS Simulator,name=iPad' test


Expected Results:
iOS Simulator is launched and unit tests execute.


Actual Results:
The Simulator does not launch, the build job hangs, eventually times out and fails. The following is logged to stdout:

2014-09-11 13:52:40.314 xcodebuild[55004:3c07]  iPhoneSimulator: Timed out waiting 120 seconds for simulator to boot, current state is 1.

Testing failed:
	Test target KashooLogicTestsDev encountered an error (Timed out waiting 120 seconds for simulator to boot, current state is 1. If you believe this error represents a bug, please attach the log file at /var/folders/gl/ty5zxsqj5tg5bgl6nl4h__wm0000gn/T/com.apple.dt.XCTest-status/Session-2014-09-11_13:50:40-jrn4Se.log)
** TEST FAILED **


Version:
Xcode 6.0 GM (6A313).
Mac OS 10.9.4 (13E28).


Notes:
This is a regression with Xcode 6.  The existing configuration worked correctly with Xcode 5, and Xcode 4 prior to that.

Reported by many other developers and discussed in https://devforums.apple.com/message/1040016#1040016



Configuration:
Jenkins CI 1.549 (although Jenkins is not required in order to demonstrate the problem).


Attachments:
'Session-2014-09-11_13:50:40-jrn4Se.log' was successfully uploaded.

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!