CruiseControl.net 1.5.7256.1:我的构建失败但仪表板显示成功

时间:2010-09-27 16:52:58

标签: cruisecontrol.net

我们遇到了CruiseControl.Net 1.5.7256.1的问题。我们的构建在实际失败时显示成功。我们强制构建,运行单元测试,一些单元测试失败并显示成功。我们使用exec任务来执行ant脚本。这是执行测试的目标:

<target name="test" depends="build" description="unit test" >
<copy file="configuration_notag.txt" tofile="${build.dir}\configuration.txt"/>
<junit errorProperty="test.failed" failureProperty="test.failed">
<formatter type="brief" usefile="false" />
<formatter type="xml" />
<classpath refid="classpath" />
<test name="${test1.class}" />
<test name="${test2.class}" />
</junit>
<fail message="Tests failed: check test reports." if="test.failed" />
</target>

以下是构建文件中的输出:

错误:(4)     [junit]测试TestNoTag失败 建筑失败 C:\ sandbox \ idblue \ idblue \ trunk \ Unit_Test \ IDBlueJavaWindowsUnitTest \ build_notag.xml:43:测试失败:检查测试报告。 总时间:2分37秒

由于蚂蚁失败,返回失败错误代码,为什么巡航控制没有接收呢?我们的ccnet.config文件中没有什么需要注意的,它只是用正确的构建文件调用ant。我们没有CruiseControl.Net 1.4.2的这个问题。还有其他人遇到过这个问题吗?用Google搜索但没有发现任何问题。

1 个答案:

答案 0 :(得分:2)

我弄清楚问题出在后面,我需要将它添加到ant.bat的最后一行:

退出%ERRORLEVEL%

这将退出代码保留回CruiseControl,并且构建最终开始失败。