ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ingmar Stein" <>
Subject Re: JUnit writes properties for each testcase
Date Wed, 12 Sep 2001 15:12:45 GMT
> Just for information purposes, it looks like you borrowed the method for
> getting properties from JUnitTestRunner, which is fine, but

Yep. Maybe we could use putAll there as well instead of enumerating all
keys and adding the corresponding values.

> >    /* 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.
> reason JUnitTestRunner does it is because that code is
> is used when forking <junit> and so the System properties could be
> than Ant's version of them.

Oops, I didn't notice that project.getProperties already contains the system
properties. Thanks.

The fact that system properties may differ if the junit task is forked makes
xmlproperties useless
for my use case as there is no way for this task to know what the system
properties will be... dammit

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

No problem...

View raw message