Bug 51845 - <record/> task cannot save the sshexec's output when in parallelrun
Summary: <record/> task cannot save the sshexec's output when in parallelrun
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.7.1
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-19 09:42 UTC by Sam He
Modified: 2011-09-19 09:42 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam He 2011-09-19 09:42:33 UTC
Task :
~~~~~~~~~~~~~~~~~~~~
> cat test.xml


*********************************************
<target name="test2">
	<foreach param="param" list="thread1,thread2" target="output2"
		parallel="true" trim="true" inheritall="true"/>
</target>
<target name="output2">
	<record name="log_${param}.log"/>
	<echo>param is: ${param} </echo>
	<sleep seconds="2"/>
	<sshexec host="xxxx"
		username="xxx"
		password="xxx"
		command="ls -ltr" />
</target>
*********************************************


Execution Result:
~~~~~~~~~~~~~~~~~~~~
> ant -f test.xml test2

*********************************************
test2:

output2:

output2:
     [echo] param is: thread2
     [echo] param is: thread1
  [sshexec] Connecting to xxxx:22
  [sshexec] Connecting to xxxx:22
  [sshexec] cmd : ls -ltr
  [sshexec] cmd : ls -ltr
  [foreach] total 104
  [foreach] drwxr-xr-x  3 cs2rel CSDev  4096 Jun 15 08:55 tools
  [foreach] drwx------  2 cs2rel CSDev  4096 Jun 23 09:10 Mail
.......
.......

*********************************************

Error
~~~~~~~~~~~~~~~~~~~~
However, the record's output file didn't contains any output of sshexec's :

> cat log_thread1.log
*********************************************
     [echo] param is: thread1 
  [sshexec] Connecting to zhadepl01:22
  [sshexec] cmd : ls -ltr
*********************************************