Search code examples
c++cruisecontrol

How to run exe file on CruiseControl


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?


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>