This issue is archived. You can view it, but you can't modify it. Learn more

ExportXMLWordPrintable

      WORKSPACE environment variable should have a windows format on windows platform.
      The synthax is <Hudson_Root>\workspace\<project name>\label/windows if (windows is the node alias)
      This is for me a major drawback as workspace env variable is important.

      To reproduce:
      I create a matrix project "test_matrix" executed on 2 nodes (windows & solaris) for each platform define an env ARCH var=sunos/winnt
      -------- configure ant task and a build.xml to execute a windows or unix script according platform.
      <?xml version='1.0'?>
      <project name="MyTest" default="test" basedir=".">
      <property environment="env"/>
      <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
      <target name="test" description="run test">
      <if>
      <equals arg1="${env.ARCH}" arg2="winnt" />
      <then>
      <echo>Launch compilations on winnt: ${env.ARCH}</echo>
      <exec executable="runKDBcc.bat" failonerror="true" />
      </then>
      <else>
      <echo>Launch compilations on unix: ${env.ARCH}</echo>
      <exec executable="runKDBcc.sh" failonerror="true" />
      </else>
      </if>
      </target>
      </project>
      ------- script for solaris unix
      runKDBcc.sh
      #! /bin/sh
      echo $WORKSPACE
      cd $WORKSPACE
      ------- script for windows
      runKDBcc.bat
      echo %WORKSPACE%
      cd %WORKSPACE%

      ------- The results on windows with workspace bad name after label.

      test:
      [echo] Launch compilations on winnt: winnt
      [exec]
      [exec] The syntax of the command is incorrect.
      [exec] C:\slave_hudson\workspace\test_matrix\label\winnt>echo C:\slave_hudson\workspace\test_matrix\label/winnt
      [exec] C:\slave_hudson\workspace\test_matrix\label/winnt
      [exec]
      [exec] C:\slave_hudson\workspace\test_matrix\label\winnt>cd C:\slave_hudson\workspace\test_matrix\label/winnt
      [exec]

            Assignee:
            Unassigned
            Reporter:
            erwan_q
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: