New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add timeout on "xcodebuild -list", if XCode version 6 #58
Conversation
Hei Raphael, I can't review the commit as the formatting was modified heavily. Could you please try again and check spacing / line endings configurations ? Feel free to push force on that branch to check it again. If you have problem, I'll try to deal with it when merging manually. |
Sorry about that. Windows + Eclipse issues..... :) |
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
Fixed line endings. |
Sorry to be an ass... Can you squash those so that I can review from the github interface ? Thanks :) |
No problem. :) Squash done. |
I think it's better to put a default timeout , instead of parse xcode version. I don't know the reason of hang in xcode 6, but I think Apple will keep this behaviour. I've tried to discover the problem, using dtruss (like strace) (https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/dtruss.1m.html). it expects (i guess) the Xcode is running. If you ran xcodebuild -list with xcode opened, it shows more activity (in dtruss). Another options, is to put an option at plugin to not run " xcodebuild -list ". |
Raphael, what about the try/catch/finally ? is it really needed ? Was it to ensure that returnCode would be 0 ? Have you checked the joinWithTimeout was returning when invoking the hanging xocdebuild -list command ? I am trying to get the code as simple as possible. |
My first test, after calls to "joinWithTimeout", the build is marked as failure. Always (maybe the TaskListener?) joinWithTimeout always returns (timeout), build always marked as fail, with no Exception. I've use try/catch block, to try to avoid this behavior. No results. So. I changed from try/catch to try/finally, to mark returnCode = 0. But the try/finally block cannot know between an real error and a timeout. This is not good. To keep the code to simple. if (resultCode > 0 && resultCode != 143) return false; |
I'd reviewed my code. It was wrong. |
Add timeout on "xcodebuild -list", if XCode version 6
No description provided.