On Fri, 22 Jun 2001, Doug MacEachern wrote:

> On Fri, 22 Jun 2001, Stas Bekman wrote:
>
> > see the attached patch. This one just rotates through all the tests N
> > times, where N is --run-tests=N (optional).
>
> looks good, two issues:
> - t/TEST -run-tests without =x will start/stop the server even it is
> already running (via t/TEST -start or -debug)
> - doesn't work for all tests (when none are specified), i think
> Apache::TestHarness is where the x run-tests should be done to fix this.

sure, I'll fix these.

> btw, did you know GetOpt::Long adds abbreviated aliases?  so you can
> actually use '-r' as shorthand for '-run-tests'

Now I do :)

> > Another option that might be interesting to add is replace:
> >
> > my $tests =
> > [ ( @{ $self->{tests} } ) x $self->{opts}->{'run-tests'} ];
> >
> > with:
> >
> > my $tests =
> > [ map { $_ x $self->{opts}->{'run-tests'} } @{ $self->{tests} } ];
> >
> > so in first case (as in the patch) tests: a, b, c are multiplied as a, b,
> > c, a, b, c, a, b, c... whereas the second example does: a, a, a, b, b, b,
> > c, c, c, ...
>
> i like the current way, but if there was an option to choose between both,
> that would be way cool.

I've 2 proposals:

1. --run-tests to be a hash option accepting:
  --run-tests --repeat=N --run-tests --rotate=[Y/N]

with the default of --repeat=1 and --rotate=Y

also may be we can do --rotate and --norotate to get the reverse instead
of Y/N. I'm not sure whether it'll work with hash values.

(do you have a better name choice for --rotate? is this the best word to
annotate the difference between interleaving vs. appending in the 'a, b,
c' example above?)

2. --run-tests[=N] --[no]rotate-tests (or simply --[no]rotate)

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



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

Reply via email to