Bug 51845

Summary: <record/> task cannot save the sshexec's output when in parallelrun
Product: Ant Reporter: Sam He <boy4u.zh>
Component: Core tasksAssignee: Ant Notifications List <notifications>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 1.7.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   

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
*********************************************