git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@982773 13f79535-47bb-0310-9956-ffa450edef68master
@@ -110,6 +110,11 @@ Fixed bugs: | |||||
to the toString invocation already. | to the toString invocation already. | ||||
Bugzilla Report 49588. | Bugzilla Report 49588. | ||||
* <apply> in parallel mode didn't work together with a nested | |||||
<redirector> if maxparallel was <= 0 (the default) or no source | |||||
files matched. | |||||
Bugzilla Report 49594. | |||||
Other changes: | Other changes: | ||||
-------------- | -------------- | ||||
@@ -391,6 +391,9 @@ file mapping will take place with each iteration. This grants the | |||||
user the capacity to receive input from, and send output to, different | user the capacity to receive input from, and send output to, different | ||||
files for each sourcefile. | files for each sourcefile. | ||||
</p> | </p> | ||||
<p>In <i>parallel</i>-mode the redirector will be reset for each batch | |||||
of executions (with <i>maxparallel</i> > 0) and null will be used | |||||
a source file just like it is in the case of <code>exec</code>.</p> | |||||
<h3>Examples</h3> | <h3>Examples</h3> | ||||
<blockquote><pre> | <blockquote><pre> | ||||
<apply executable="ls"> | <apply executable="ls"> | ||||
@@ -708,6 +708,11 @@ public class ExecuteOn extends ExecTask { | |||||
String[] command = getCommandline(s, b); | String[] command = getCommandline(s, b); | ||||
log(Commandline.describeCommand(command), Project.MSG_VERBOSE); | log(Commandline.describeCommand(command), Project.MSG_VERBOSE); | ||||
exe.setCommandline(command); | exe.setCommandline(command); | ||||
if (redirectorElement != null) { | |||||
setupRedirector(); | |||||
redirectorElement.configure(redirector, null); | |||||
exe.setStreamHandler(redirector.createHandler()); | |||||
} | |||||
runExecute(exe); | runExecute(exe); | ||||
} else { | } else { | ||||
int stillToDo = fileNames.size(); | int stillToDo = fileNames.size(); | ||||
@@ -756,4 +756,37 @@ | |||||
<au:assertLogContains text="${z}.bar,x out" /> | <au:assertLogContains text="${z}.bar,x out" /> | ||||
</target> | </target> | ||||
<target name="testRedirectorWithParallel" if="test.can.run" depends="xyz"> | |||||
<apply executable="sh" dest="${input}" parallel="true" addsourcefile="yes"> | |||||
<arg value="parrot.sh" /> | |||||
<targetfile/> | |||||
<fileset refid="xyz" /> | |||||
<globmapper from="*" to="*.bar"/> | |||||
<redirector output="${output}/all_out.txt" append="yes"/> | |||||
</apply> | |||||
<au:assertResourceContains resource="${output}/all_out.txt" | |||||
value="x.bar out"/> | |||||
<au:assertResourceContains resource="${output}/all_out.txt" | |||||
value="x.bar err"/> | |||||
<au:assertResourceContains resource="${output}/all_out.txt" | |||||
value="x out"/> | |||||
<au:assertResourceContains resource="${output}/all_out.txt" | |||||
value="x err"/> | |||||
<au:assertResourceContains resource="${output}/all_out.txt" | |||||
value="y.bar out"/> | |||||
<au:assertResourceContains resource="${output}/all_out.txt" | |||||
value="y.bar err"/> | |||||
<au:assertResourceContains resource="${output}/all_out.txt" | |||||
value="y out"/> | |||||
<au:assertResourceContains resource="${output}/all_out.txt" | |||||
value="y err"/> | |||||
<au:assertResourceContains resource="${output}/all_out.txt" | |||||
value="z.bar out"/> | |||||
<au:assertResourceContains resource="${output}/all_out.txt" | |||||
value="z.bar err"/> | |||||
<au:assertResourceContains resource="${output}/all_out.txt" | |||||
value="z out"/> | |||||
<au:assertResourceContains resource="${output}/all_out.txt" | |||||
value="z err"/> | |||||
</target> | |||||
</project> | </project> |