xcodebuild won't perform any test while running inside ssh session
| Originator: | nskboy | ||
| Number: | rdar://15028661 | Date Originated: | 19-Sep-2013 12:37 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | 5.0 |
| Classification: | Crash/Hang/Data Loss | Reproducible: | Always |
Summary:
It's impossible to run unit tests with xcodebuild inside SSH session. Thus it prevents us from running unit tests during regular CI build. They work fine if run them from VNC session.
Steps to Reproduce:
1. Boot your OS X build server. I have Mac mini with OS X 10.8.4 and two versions of Xcode installed: 5.0 and 4.6.3.
2. Perform GUI login as user who runs CI builds (e.g. teamcity)
3. Login as teamcity via SSH and run following command: DEVELOPER_DIR=/Applications/Xcode5.app/Contents/Developer xcodebuild -scheme TestTest -destination 'platform=iOS Simulator,name=iPad' test
Expected Results:
Tests should be performed normally
Actual Results:
xcodebuild builds the project, runs simulator, launches app under test and then stuck on running tests:
setenv XCODE_VERSION_MINOR 0500
setenv XPCSERVICES_FOLDER_PATH TestTestTests.octest/XPCServices
setenv YACC yacc
setenv arch i386
setenv diagnostic_message_length 425
setenv variant normal
/bin/sh -c /Users/teamcity/Library/Developer/Xcode/DerivedData/TestTest-dspncyrbvnqhgkeqpdrksbqeakir/Build/Intermediates/TestTest.build/Debug-iphonesimulator/TestTestTests.build/Script-A12A8F6F17EAE72A000B232C.sh
^C** BUILD INTERRUPTED **
Version:
Xcode 5.0, Build version 5A1412
Xcode 4.6.3, Build version 4H1503
OS X 10.8.4, Build 12E55
Notes:
Configuration:
The same problem doesn't occur when I login via VNC session and run the same command from terminal.
Attachments:
'TestTest.zip' 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!
It looks like I found the root cause of this problem: 'teamcity' is standard account on build server. I promoted it to administrative and everything started to work properly.
I've upgraded my main build server to 10.8.5, rerun the same command using the same project and problem was reproduced again. I also tried to run the same command on latest OS X Mavericks (build 13A584) and the problem wasn't reproduced.
Please note, that main build server has two Xcodes installed, Mavericks box has only Xcode 5 from App Store. One odd thing: after I unpacked sample project on a Mavericks, xcodebuild refused to run tests due to following error:
$ xcodebuild -scheme TestTest -destination 'platform=iOS Simulator,name=iPad' clean test xcodebuild: error: The project 'TestTest' does not contain a scheme named 'TestTest'.
$ xcodebuild -list Information about project "TestTest": Targets: TestTest TestTestTests
I opened it in Xcode, closed Xcode and rerun tests — everything went fine (output right after tests were executed):
$ xcodebuild -list Information about project "TestTest": Targets: TestTest TestTestTests