Will use the same script wrapper yes. The mojos really just exists to pull the parameters out of the maven pom. The reason I want scripts output, is so that I can include them in a distribution, for running tests later. The reason I want to be able to run the tests from an invocation of mvn on the command line, is so that the tests can be run immediately as part of a build. Could just use the scripts for that, I suppose, but it seemed cleaner to avoid doing an 'fork' on a script from a maven build, and also may want to run the tests in the build vm without forking, just like you can with surefire. This isn't elegant code; just something that was pulled together any-old-how. I stole the surefire plugin mojo, and hacked out what I needed of it, as a starting point (need an isolated class loader based on the test classpath, for one thing).
There is really very little in these mojos. The real logic is in the TKTestRunner, which is an extension of the default JUnit test runner, to add capabilities to time, repeat, scale and parameterize tests. Rupert On 04/02/2008, Rafael Schloming <[EMAIL PROTECTED]> wrote: > > Rupert Smith wrote: > > On 04/02/2008, Rafael Schloming <[EMAIL PROTECTED]> wrote: > >> > >> - perftests: > >> > >> The launcher for these tests needs to be disentangled from maven > >> somehow. > > > > > > There are two maven 'mojos' for this. One that runs the tests directly, > and > > one that outputs .sh scripts to run them later. Runner script pulls > > parameters from the maven XML and builds a command line to call the > command > > line runner with. The script generator pulls parameters from the maven > XML > > and substitutes them into a (hard-coded) script template. I will have to > put > > together an equivalent set of custom ant tasks these. > > What's the reason for the two different techniques? Could a regular old > java main with a single script wrapper be used both from ant and from > the command line? > > Sorry if this is a dumb question, I haven't dug too deeply into the > perftests. > > --Rafael >
