ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: path & fileset question
Date Mon, 27 Aug 2007 18:04:39 GMT

--- Krzysztof Kucybała <kkucybala@echo.fr> wrote:

> 
> > That seems a little strange, but I'll take your
> word
> > for it as I know nothing about phpunit.  The
> obvious
> > (to me, anyway; sorry) way to get the target
> filename
> > and the --log whatever that was switch together is
> to
> > add the switch to your mapper.  But somehow I am
> > afraid this may not be the issue.  Just make sure
> your
> > <apply> command matches what you've posted here
> and
> > that the verbose log makes sense given what's in
> your
> > buildfile, and feel free to check back in here
> until
> > we narrow down what's happening.
> > 
> 
> Thanks. I followed Your advice putting that
> --log-xml option into the 
> mapper, but it was no good. I got this message:
> 
> unrecognized option --log-xml
> BankAccountTest.php.log.xml
> 
> which suggests that in fact these need to be two
> separate command line 
> arguments. I removed the superfluous configuration
> from my build.xml, 
> but it's still no good. For some reason, the command
> does get executed, 
> but the log file is not created. Here's what it
> looks now:
> 
> <apply executable="phpunit2"
> 	dir="${deploy_path}/unit2"
> 	dest="${log_dir}"
> 	relative="true"
> 	output="${log_dir}/test.dump"
> 	logError="true"
> 	append="true"
> 	verbose="true"
> 	failonerror="true">
> 	
> 	<mapper type="glob" from="*.php"
> to="*.php.log.xml"/>
> 	<fileset dir="${deploy_path}/unit2">
> 		<include name="**/*test.php"/>
> 		<include name="**/*Test.php"/>
> 	</fileset>
> 	<arg value="--log-xml"/>
> 	<targetfile/>
> </apply>
> 
> I also tried to substitute the <targetfile/> with
> something simple, like 
> <arg value="foo.log.xml"/>, but without result. Even
> doing that same 
> thing with <arg line="--log-xml foo.log.xml"/>
> instead of both args 
> gives me nothing - the tests run, but there's no log
> file. However this:
> 
> <exec dir="${deploy_path}/${phpunit_dir}"
> 	executable="${phpunit_exec}"
> 	output="${log_dir}/test.dump"
> 	error="${log_dir}/test.dump"
> 	append="true"
> 	resultproperty="returncode">
> <arg line="--log-xml
> ${log_dir}/${phpunit_file}.log.xml ${phpunit_class} 
> ${phpunit_file}"/>
> </exec>
> 
> gives me precisely what I want. The difference is
> that I'm using this 
> for a set of older tests, which need to be executed
> with an additional 
> parameter - name of the test class. I have a fixed
> set of these - 
> they're no longer developed, and there is a separate
> invocation for each 
> one of them int the ant file, unlike the new ones,
> which are supposed to 
> be taken out of a directory, whatever they're
> number. These old ones 
> produce the log I need. What do You make of it? Have
> You got any idea 
> why this is happening? Thanks in advance for any
> further help.
> 

It seems suspicious that the arg line you use with
exec contains this ${phpunit_class} value, but your
<apply> task has no corresponding arg element.  Have
you looked at the log messages created by running Ant
in -verbose mode to verify that each execution appears
to have been reasonably constructed?

-Matt

> Best regards,
> Krzysztof
> 
> > -Matt
> > 
> >> Best regards,
> >> Krzysztof
> >>> HTH,
> >>> Matt
> >>>
> >>>> Best regards,
> >>>> Krzysztof
> >>>>
> >>>>
> >
>
---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail:
> >>>> user-unsubscribe@ant.apache.org
> >>>> For additional commands, e-mail:
> >>>> user-help@ant.apache.org
> >>>>
> >>>>
> >>>
> >>>
> >>>        
> >>>
> >
>
____________________________________________________________________________________
> >>> Building a website is a piece of cake. Yahoo!
> >> Small Business gives you all the tools to get
> >> online.
> >>> http://smallbusiness.yahoo.com/webhosting 
> >>>
> >>>
> >
>
---------------------------------------------------------------------
> >>> To unsubscribe, e-mail:
> >> user-unsubscribe@ant.apache.org
> >>> For additional commands, e-mail:
> >> user-help@ant.apache.org
> >>>
> >>
> >
>
---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> >> user-unsubscribe@ant.apache.org
> >> For additional commands, e-mail:
> >> user-help@ant.apache.org
> >>
> >>
> > 
> > 
> > 
> >        
> >
>
____________________________________________________________________________________
> > Pinpoint customers who are looking for what you
> sell. 
> > http://searchmarketing.yahoo.com/
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> user-help@ant.apache.org
> > 
> > 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



      ____________________________________________________________________________________
Shape Yahoo! in your own image.  Join our Network Research Panel today!   http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message