lacostej commented on Bug JENKINS-24874

I would like to implement a fix for this with something like

diff --git a/src/main/java/au/com/rayh/XCodeBuilder.java b/src/main/java/au/com/rayh/XCodeBuilder.java
index 5e7971b..56a7da0 100644
--- a/src/main/java/au/com/rayh/XCodeBuilder.java
+++ b/src/main/java/au/com/rayh/XCodeBuilder.java
@@ -480,7 +480,8 @@ public class XCodeBuilder extends Builder {
                 commandLine.add("-project");
                 commandLine.add(xcodeProjectFile);
             }
-            returnCode = launcher.launch().envs(envs).cmds(commandLine).stdout(listener).pwd(projectRoot).start().joinWithTimeout(10, TimeUnit.SECONDS, listener);
+            // xcode 6 can timeout upon listing the environment. Let's use a default harcoded timeout.
+            returnCode = launcher.launch().envs(envs).cmds(commandLine).stdout(listener).pwd(projectRoot).start().joinWithTimeout(10, TimeUnit.SECONDS, listener);
             if (returnCode > 0) return false;
         }
         listener.getLogger().println(Messages.XCodeBuilder_DebugInfoLineDelimiter());

(it would require an adapted listener to handle the error appropriately and display a tip.

But I am unable to create a case so far.

I tested the following on the command line:

me@here ~/ echo $DEVELOPER_DIR
/Applications/Xcode6.0.1.app/Contents/Developer 
me@here ~/  xcodebuild -version
Xcode 6.0.1
Build version 6A317
me@here ~/ xcodebuild -list 
Information about project "Unity-iPhone":
    Targets:
        Unity-iPhone
        Unity-iPhone Tests

    Build Configurations:
        Release
        Debug

    If no build configuration is specified and -scheme is not passed then "Release" is used.

    Schemes:
        Unity-iPhone
me@here ~/ mv ./Unity-iPhone.xcodeproj/xcshareddata/xcschemes/Unity-iPhone.xcscheme ..
me@here ~/ xcodebuild -list 
Information about project "Unity-iPhone":
    Targets:
        Unity-iPhone
        Unity-iPhone Tests

    Build Configurations:
        Release
        Debug

    If no build configuration is specified and -scheme is not passed then "Release" is used.

    This project contains no schemes.
me@here ~/ mv ../Unity-iPhone.xcscheme ./Unity-iPhone.xcodeproj/xcshareddata/xcschemes/
me@here ~/ mv ./Unity-iPhone.xcodeproj/xcshareddata ..
me@here ~/ xcodebuild -list 
Information about project "Unity-iPhone":
    Targets:
        Unity-iPhone
        Unity-iPhone Tests

    Build Configurations:
        Release
        Debug

    If no build configuration is specified and -scheme is not passed then "Release" is used.

    This project contains no schemes.
me@here ~/ xcodebuild -list -project Unity-iPhone.xcodeproj
Information about project "Unity-iPhone":
    Targets:
        Unity-iPhone
        Unity-iPhone Tests

    Build Configurations:
        Release
        Debug

    If no build configuration is specified and -scheme is not passed then "Release" is used.

    This project contains no schemes.

So I am unable to get xcodebuild -list to hang even if I remove the whole ./Unity-iPhone.xcodeproj/xcshareddata/

Any tip ?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to