Xcode 6.3.1: xcodebuild only streams test results when attached to a TTY
| Originator: | jp | ||
| Number: | rdar://21428551 | Date Originated: | 17-Jun-2015 02:10 PM |
| Status: | Closed | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 6.3.1 (6D1002) |
| Classification: | UI/Usability | Reproducible: | Always |
Summary: xcodebuild only streams test results when attached to a TTY Steps to Reproduce: 1. Start a shell session with no TTY. 2. Run `xcodebuild test` on a project with tests. Expected Results: Test results should be logged as they are invoked, just like what happens in a regular TTY-based shell. Actual Results: Test results are only logged after all the tests have run. Regression: N/A. Notes: N/A.
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!
Simple workaround
Here is a very simple workaround, just set the
NSUnbufferedIOenvironment variable toYES:env NSUnbufferedIO=YES xcodebuild test
Apple Response
There are no plans to address this based on the following:
Jean-Pierre, you can install your own logging mechanism for XCTest by using the APIs in XCTestObservationCenter and then have to do any kind of logging you wish. To do so:
1) Register an NSPrincipalClass in your test bundle’s Info.plist
2) This class should conform to XCTestObservation
3) In the -init for your principal class, it should register with XCTestObservationCenter.
4) Implement the observation methods for test start, fail, finish, etc. and log the results however you want.
We are now closing this report.
If you have questions about the resolution, or if this is still a critical issue for you, then please update your bug report with that information.