[JIRA] (JENKINS-15326) Error running ant with matrix build
Roger Lopez commented on JENKINS-15326 Error running ant with matrix build Yes this is still an issue. To make it simple to replicate the issue, I created a gist (https://gist.github.com/3793861) with a simple ant build file. With that repo I can replicate the issue like so: Create a new job, selecting the "Build multi-configuration project" option. Name the job whatever you want. Choose git for your SCM and use git://gist.github.com/3793861.git as the repo URL. Add a "Sauce OnDemand Cross-browser tests" axis. Select any combination of browsers. Add an "Invoke ant" build step and using the "test" target (without quotes). Save and build. The console output varies based on the browser selected. Here are some samples: Windows 2003 IE6 Started by upstream project "JENKINS-15326" build number 3 Building on master in workspace /Users/zroger/.jenkins/jobs/JENKINS-15326/workspace/SELENIUM_DRIVER/Windows 2003iexploreproxy6 Checkout:Windows 2003iexploreproxy6 / /Users/zroger/.jenkins/jobs/JENKINS-15326/workspace/SELENIUM_DRIVER/Windows 2003iexploreproxy6 - hudson.remoting.LocalChannel@9cd1d3c Using strategy: Default Cloning the remote Git repository Cloning repository origin Fetching upstream changes from git://gist.github.com/3793861.git Commencing build of Revision 30967741d6003357a91d27c04a030e33af1a73f4 (origin/HEAD, origin/master) Checking out Revision 30967741d6003357a91d27c04a030e33af1a73f4 (origin/HEAD, origin/master) No change to record in branch origin/HEAD No change to record in branch origin/master [Windows 2003iexploreproxy6] $ ant "-DSELENIUM_DRIVER=sauce-ondemand:?os=Windows 2003browser=iexploreproxybrowser-version=6" '-Darguments="-DSELENIUM_DRIVER=sauce-ondemand:?os=Windows 2003browser=iexploreproxybrowser-version=6"' test /usr/bin/ant: line 335: browser-version=6: command not found Buildfile: /Users/zroger/.jenkins/jobs/JENKINS-15326/workspace/SELENIUM_DRIVER/Windows 2003iexploreproxy6/build.xml BUILD FAILED Target "2003" does not exist in the project "JENKINS-15326". Total time: 0 seconds Build step 'Invoke Ant' marked build as failure Finished: FAILURE Linux Google Chrome Started by upstream project "JENKINS-15326" build number 4 Building on master in workspace /Users/zroger/.jenkins/jobs/JENKINS-15326/workspace/SELENIUM_DRIVER/Linuxgooglechrome Checkout:Linuxgooglechrome / /Users/zroger/.jenkins/jobs/JENKINS-15326/workspace/SELENIUM_DRIVER/Linuxgooglechrome - hudson.remoting.LocalChannel@9cd1d3c Using strategy: Default Last Built Revision: Revision 30967741d6003357a91d27c04a030e33af1a73f4 (origin/HEAD, origin/master) Fetching changes from 1 remote Git repository Fetching upstream changes from git://gist.github.com/3793861.git Commencing build of Revision 30967741d6003357a91d27c04a030e33af1a73f4 (origin/HEAD, origin/master) Checking out Revision 30967741d6003357a91d27c04a030e33af1a73f4 (origin/HEAD, origin/master) Warning : There are multiple branch changesets here [Linuxgooglechrome] $ ant -DSELENIUM_DRIVER=sauce-ondemand:?os=Linuxbrowser=googlechromebrowser-version= -Darguments="-DSELENIUM_DRIVER=sauce-ondemand:?os=Linuxbrowser=googlechromebrowser-version=" test /usr/bin/ant: line 335: browser-version=: command not found Buildfile: /Users/zroger/.jenkins/jobs/JENKINS-15326/workspace/SELENIUM_DRIVER/Linuxgooglechrome/build.xml test: [echo] Hello world BUILD SUCCESSFUL Total time: 0 seconds Build step 'Invoke Ant' marked build as failure Finished: FAILURE Hope this helps. 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
[JIRA] (JENKINS-15326) Error running ant with matrix build
Roger Lopez commented on JENKINS-15326 Error running ant with matrix build This patch seems to work for me, but I'm not familiar enough with the project to know why the quotes were there in the first place. https://gist.github.com/3795164 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
[JIRA] (JENKINS-15326) Error running ant with matrix build
Roger Lopez created JENKINS-15326 Error running ant with matrix build Issue Type: Bug Assignee: Kohsuke Kawaguchi Components: sauce-ondemand Created: 26/Sep/12 9:59 PM Description: I have set up a matrix job with the same configuration as a working non-matrix job. I have a single build step that invokes a simple ant target. On the Sauce axis, I have chosen two browser configs and on the Slaves axis, I have chosen a single slave. This yields two jobs. When the two jobs run, there is an ant error which seems to be failing because of the way that the SELENIUM_DRIVER argument is passed to ant. [rh2vagrant] $ ant -DSELENIUM_DRIVER=sauce-ondemand:?os=Linuxbrowser=googlechromebrowser-version= -Darguments="-DSELENIUM_DRIVER=sauce-ondemand:?os=Linuxbrowser=googlechromebrowser-version=" -Dlabel=rh2vagrant -Dbehat.profile="" ci /usr/bin/ant: line 326: browser-version=: command not found Buildfile: build.xml [rh2vagrant] $ ant "-DSELENIUM_DRIVER=sauce-ondemand:?os=Windows 2008browser=iexploreproxybrowser-version=9" '-Darguments="-DSELENIUM_DRIVER=sauce-ondemand:?os=Windows 2008browser=iexploreproxybrowser-version=9"' -Dlabel=rh2vagrant -Dbehat.profile="" ci /usr/bin/ant: line 326: browser-version=9: command not found Buildfile: build.xml BUILD FAILED Target "2008" does not exist in the project "behat". In the first output, the SELENIUM_DRIVER argument is completely unquoted, while in the second output, the entire thing, including the -D is in quotes. Could I be doing something wrong? Any help is greatly appreciated. Project: Jenkins Priority: Major Reporter: Roger Lopez 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
[JIRA] (JENKINS-15326) Error running ant with matrix build
Roger Lopez updated JENKINS-15326 Error running ant with matrix build Change By: Roger Lopez (26/Sep/12 10:02 PM) Description: Ihavesetupamatrixjobwiththesameconfigurationasaworkingnon-matrixjob.Ihaveasinglebuildstepthatinvokesasimpleanttarget.OntheSauceaxis,IhavechosentwobrowserconfigsandontheSlavesaxis,Ihavechosenasingleslave.Thisyieldstwojobs.Whenthetwojobsrun,thereisananterrorwhichseemstobefailingbecauseofthewaythattheSELENIUM_DRIVERargumentispassedtoant.{code}[rh2vagrant]$ant-DSELENIUM_DRIVER=sauce-ondemand:?os=Linuxbrowser=googlechromebrowser-version=-Darguments=-DSELENIUM_DRIVER=sauce-ondemand:?os=Linuxbrowser=googlechromebrowser-version=-Dlabel=rh2vagrant-Dbehat.profile="">/usr/bin/ant:line326:browser-version=:commandnotfoundBuildfile:build.xml{code}{code}[rh2vagrant]$ant-DSELENIUM_DRIVER=sauce-ondemand:?os=Windows2008browser=iexploreproxybrowser-version=9-Darguments=-DSELENIUM_DRIVER=sauce-ondemand:?os=Windows2008browser=iexploreproxybrowser-version=9-Dlabel=rh2vagrant-Dbehat.profile="">/usr/bin/ant:line326:browser-version=9:commandnotfoundBuildfile:build.xmlBUILDFAILEDTarget2008doesnotexistintheprojectbehat.{code}Inthefirstoutput,theSELENIUM_DRIVERargumentiscompletelyunquoted,whileinthesecondoutput,theentirething,includingthe-Disinquotes.CouldIbedoingsomethingwrong?Anyhelpisgreatlyappreciated. IamrunningJenkinsver.1.476withSauceOnDemandpluginver.1.21. 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
[JIRA] (JENKINS-15326) Error running ant with matrix build
Roger Lopez commented on JENKINS-15326 Error running ant with matrix build Upon further inspection, it looks like this may actually be a problem with the -Darguments argument. Line 326 of /usr/bin/ant is eval $ant_exec_command Adding an echo of $ant_exec_command before the eval gives me this: exec "/usr/lib/jvm/java/bin/java" -classpath "/usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar:/usr/share/java/jaxp_parser_impl.jar:/usr/share/java/xml-commons-apis.jar:/usr/lib/jvm/java/lib/tools.jar" -Dant.home="/usr/share/ant" -Dant.library.dir="/usr/share/ant/lib" org.apache.tools.ant.launch.Launcher -cp "" "-DSELENIUM_DRIVER=sauce-ondemand:?os=Windows 2008browser=iexploreproxybrowser-version=9" "-Darguments="-DSELENIUM_DRIVER=sauce-ondemand:?os=Windows 2008browser=iexploreproxybrowser-version=9"" "-Dlabel=rh2vagrant" "-Dbehat.profile="" class="code-quote">" "ci" So it looks like the quotes in -Darguments are to blame. 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