On Mon, 09 Feb 2004, Mariano Benitez <[EMAIL PROTECTED]> wrote:

>     The problem is that I cannot simulate this using JUnit with
>     fork, because I cannot change the main class and use mine
>     instead.

I assume that your class understands all the command line arguments
Ant's testrunner uses and passes them along.  How would your class
deal with new arguments we add?

The main problem with opening up access to the test runner class is
just that.  As soon as we do it, we run the risk of breaking other
people's builds when we change the protocol between the task and the
test runner.  There is no danger now, as we always know the main class
that gets invoked.

> 1) leave <junit forked="true" jvm="launcher"> and have "launcher"
> script change the command line

Ugly but portable accross Ant versions.

> 2) patch junit to allow me to put a boot class
> 3) extend junit (the problem is that JUnitTask.executeAsForked and
> commandline are private, so I should patch the task anyway)

Both cases are dangerous for us to do as they make future development
more difficult for us.  If we'd choose either one, we'd have to come
up with a strict contract for the boot class first.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to