Andrew McIntyre wrote:
On 1/11/07, Daniel John Debrunner <[EMAIL PROTECTED]> wrote:

Thanks for the reply.

[Q1 snipped]

Q2) From a call to junit-oneclass can I set a system property for the
forked JVM? E.g.

     <antcall target="junit-oneclass">
       <param name="derby.junit.jvm"
              value="${jdk16}/bin/java"/>
       <param name="derby.junit.testname"

value="org.apache.derbyTesting.functionTests.tests.jdbcapi.AutoloadBooting"/>
     </antcall>

How could I set a system property that will be passed onto the JVM
running the junit test?

We could put a placeholder <jvmarg> into the junit-oneclass <java>
task that is set to the value of a property. I believe that if the
property is set in an antcall <param>, the value of the property will
be reverted back to its previous unset state once that antcall is
done, so the property wouldn't affect other calls to junit-oneclass,
but I would want to test that to be certain.

Seems like we almost rely on that behaviour today, given we use param in some of the calls to junit-oneclass, such as junit-jdbc4. I confirmed that values set in param are reset with a simple experiment.

Thanks,
Dan.


Reply via email to