Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Dev

Apache-Test: run-tests improve patch

 

 

ModPerl dev RSS feed   Index | Next | Previous | View Threaded


stas at stason

Jun 24, 2001, 4:36 AM

Post #1 of 3 (984 views)
Permalink
Apache-Test: run-tests improve patch

here is the patch (against cvs) that allows you to:

'run-tests[=N[:mode]]' => [.'run the tests',
{
N => 'repeat times',
mode => '(repeat|rotate|random)',
}],

the actual regex is more flexible and allows:
--run-tests[=[N][:][mode]]

-r=N:mode, -r=Nmode, -r=N, -r=mode, -r (-r == --run-tests)

should I adjust the usage? or make it more strict for users who don't look
at the source code :)

> - t/TEST -run-tests without =x will start/stop the server even it is
> already running (via t/TEST -start or -debug)

is it OK now?

> - 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.

fixed

> - something else to look into, a recent bug has been introduced, if
> t/TEST -run=2 starts the server, when $SIG{INT} is caught it should
> stop the server but does not at the moment.

I don't understand why would you want to do that. --run-tests is already a
non-standard execution, and when I debug it's quite nice to have the
server keep on running.

In any case, I think that this is not related to the change I'm
introducing. Was it different beforehand?

Now, Doug, try --run-tests=20random, I've seen about 8% failure rate.
Since you should be able to reproduce problems in the random mode, I
introduce yet another option --seed. When you run in the random mode, the
seed is printed. So:
- is it ok to add this option?
- -s is taken :) what option name can I use?
- I can do --run-tests=N:mode:seed but then it gets too cumbersome


_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas [at] stason http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Attachments: diff (6.00 KB)


dougm at covalent

Jun 25, 2001, 4:19 PM

Post #2 of 3 (963 views)
Permalink
Re: Apache-Test: run-tests improve patch [In reply to]

On Sun, 24 Jun 2001, Stas Bekman wrote:

> here is the patch (against cvs) that allows you to:
>
> 'run-tests[=N[:mode]]' => [.'run the tests',
> {
> N => 'repeat times',
> mode => '(repeat|rotate|random)',
> }],
>
> the actual regex is more flexible and allows:
> --run-tests[=[N][:][mode]]
>
> -r=N:mode, -r=Nmode, -r=N, -r=mode, -r (-r == --run-tests)

nice.

> should I adjust the usage? or make it more strict for users who don't look
> at the source code :)

if you can make the code 'dwim' without too much trouble, thats cool.

> > - t/TEST -run-tests without =x will start/stop the server even it is
> > already running (via t/TEST -start or -debug)
>
> is it OK now?

yes, thanks.

> > - something else to look into, a recent bug has been introduced, if
> > t/TEST -run=2 starts the server, when $SIG{INT} is caught it should
> > stop the server but does not at the moment.
>
> I don't understand why would you want to do that. --run-tests is already a
> non-standard execution, and when I debug it's quite nice to have the
> server keep on running.

it should be the same as running 't/TEST', if the server is not already
running, it will be started for you, and should be stopped for you.
if you want to keep the server running, start it yourself first with
't/TEST -start|debug'

> In any case, I think that this is not related to the change I'm
> introducing. Was it different beforehand?

sort of, -run-tests didn't start the server before if it wasn't already
running. but now that it does (which is fine), it should stop the server
if it started it.

> Now, Doug, try --run-tests=20random, I've seen about 8% failure rate.
> Since you should be able to reproduce problems in the random mode, I
> introduce yet another option --seed. When you run in the random mode, the
> seed is printed. So:
> - is it ok to add this option?
> - -s is taken :) what option name can I use?
> - I can do --run-tests=N:mode:seed but then it gets too cumbersome

how about just using an environment variable for the moment.
hopefully the chances of needing to specify a seed will be rare.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


stas at stason

Jun 25, 2001, 10:12 PM

Post #3 of 3 (961 views)
Permalink
Re: Apache-Test: run-tests improve patch [In reply to]

> > > - something else to look into, a recent bug has been introduced, if
> > > t/TEST -run=2 starts the server, when $SIG{INT} is caught it should
> > > stop the server but does not at the moment.
> >
> > I don't understand why would you want to do that. --run-tests is already a
> > non-standard execution, and when I debug it's quite nice to have the
> > server keep on running.
>
> it should be the same as running 't/TEST', if the server is not already
> running, it will be started for you, and should be stopped for you.
> if you want to keep the server running, start it yourself first with
> 't/TEST -start|debug'
>
> > In any case, I think that this is not related to the change I'm
> > introducing. Was it different beforehand?
>
> sort of, -run-tests didn't start the server before if it wasn't already
> running. but now that it does (which is fine), it should stop the server
> if it started it.

Oh, I understand. Will do.

> > Now, Doug, try --run-tests=20random, I've seen about 8% failure rate.
> > Since you should be able to reproduce problems in the random mode, I
> > introduce yet another option --seed. When you run in the random mode, the
> > seed is printed. So:
> > - is it ok to add this option?
> > - -s is taken :) what option name can I use?
> > - I can do --run-tests=N:mode:seed but then it gets too cumbersome
>
> how about just using an environment variable for the moment.
> hopefully the chances of needing to specify a seed will be rare.

let it be env var.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl

ModPerl dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.