ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <>
Subject Re: JUnit writes properties for each testcase
Date Wed, 12 Sep 2001 15:05:42 GMT

Just for information purposes, it looks like you borrowed the method for
getting properties from JUnitTestRunner, which is fine, but

>    /* add ant system properties */
>    props.putAll( project.getProperties() );
>    /* add/overlay system properties */
>    props.putAll( System.getProperties() );

within a task, there is no need to overlay System properties on Ant
properties as Ant's properties contain the System properties already.   The
reason JUnitTestRunner does it is because that code is JUnitTestRunner.main
is used when forking <junit> and so the System properties could be different
than Ant's version of them.

Having a task handy that outputs the Ant properties in XML format is a good
thing.  Thank you.


View raw message