Question

I've been looking through CruiseControl documentation and I found tag and for running scripts. But when I am trying to run exe-file from that tags it does not work as well as it described in documantation.

I also tried to put call of the exe in batch file and execute it from CruiseControl but also did not work as I expected. So how can I run exe-file from CC? I also need to be able to include output of this file work in my email notification is it possible at all? E.g. I have file UnitTests.exe which prints something like this:

Unit tests are passed.
47 Tests was successful

How can I do this? Or how can I at least get an returning code from that executable file?

Was it helpful?

Solution

Run the exec in ant. In cruisecontrol:

    <schedule>
        <ant anthome="/usr/apache-ant-1.8.2" buildfile="/usr/ant-build-files/my-ant-build-file.build" target="do-task" uselogger="true">
        </ant>
    </schedule>

In /usr/ant-build-files/my-ant-build-file.build ...

    <target name="do-task">             
        <exec executable="/<path to dir containing exe>/UnitTests.exe" failonerror="true">
        <arg line="<args to UnitTests.exe>"/>
    </exec>

OTHER TIPS

There is option to execute .bat or .exe files using the following tag.

  <exec executable="c:/something.exe" />

You can place the above line in any target of the xml files that your build script is going to call.

<target name="target-to-call-an-exe">
      <exec executable="c:/cygwin/bin/bash.exe" />
</target>

Hope this helps, Thanks.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top