How do I stop jumbling of output from multiple Ant tasks when using the Parallel Task?

允我心安 提交于 2019-12-11 06:51:43

问题


I'm modifying our build.xml to use the Parallel Task, primarily to speed up our build on our CI server.

One small issue I'm having is stopping the output (stdout) from getting jumbled.

<target name="build">
    <antcall target="clean"/>
    <antcall target="prepare"/>
    <antcall target="externals"/>
    <antcall target="migrate"/>

    <parallel>
        <antcall target="phpunit"/>         
        <antcall target="jshint"/>
        <antcall target="phploc"/>
        <antcall target="phpcpd"/>
        <antcall target="pdepend"/>
        <antcall target="phpcs"/>
        <antcall target="phpmd"/>
        <antcall target="php-lint"/>
    </parallel>
</target>

A snip of the output (from php-lint & phpunit tasks):

[apply] No syntax errors detected in /home/bhafichuk/workspace/icarus/source/library/Icarus/Model/DbTable/User.php
 [exec] ............................................................
 [exec] 
 [exec] Time: 02:11, Memory: 24.75Mb
 [exec] 
        OK (123 tests, 433 assertions)

[apply] No syntax errors detected in /home/bhafichuk/workspace/icarus/source/library/Icarus/Model/DbTable/User/Contact.php

I would hope there would be a way to buffer the task's output until the task is complete and then write to stdout.

Note that I really don't care about the ordering of the output with respect to tasks, just the interleaving of one tasks output with anothers.

Does anyone have any suggestions on how to do this? Is there possibly a better way to increase the speed of our build that doesn't cause this issue?

来源:https://stackoverflow.com/questions/10130052/how-do-i-stop-jumbling-of-output-from-multiple-ant-tasks-when-using-the-parallel

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!