develooper Front page | perl.perl5.porters | Postings from November 2003

Re: [PATCH 5.8.2 @21574] make tests relocatable

Thread Previous | Thread Next
Ilya Zakharevich
November 13, 2003 16:38
Re: [PATCH 5.8.2 @21574] make tests relocatable
Message ID:
On Thu, Nov 13, 2003 at 04:06:52PM -0800, Michael G Schwern wrote:
> >   ./perl t/op/stat.t
> > 
> > to provide as small "Perl-related environment" as possible.  E.g.,
> > consider line-ending bugs;  if
> > 
> >   ./perl t/TEST op/stat.t
> > 
> > fails, I do not know whether I should debug t/TEST, or t/op/stat.t.
> You can do 
> 	./perl -MTestInit op/stat.t

Same difference.  This brings in possible bugs in

These arguments are similar to "just use CPANPLUS instead of CPAN":
This does not make sense until CPANPLUS and its prerequisites *work*;
and preferably work "reliably", so the percentage of time one spends
fixing CPANPLUS is negligible.

The whole idea of the test suite is to automatically pinpoint the
failing code as narrow as possible.  If the bugs in TestInit get in
the way, this is not going to be fun to pinpoint things.

Let me summarize: I think that at least some "basic" set of
functionality should be tested without reliance on TestInit.  Most
probably having boilerplates left in t/{base,run,op,comp,io} is
enough.  The rest can be required to run with TestInit.

And the boilerplate can look like this:

    return if $ENV{PERL_TESTINIT_DONE};
    cd 't' if -d 't';
    @INC = '../lib';

> I for one would be really happy if the ever expanding set of repeated
> code necessary at the top of dual-life module tests could be reduced.

Me too; but as far as they simplify testing bugs, they should stay.

Hope this helps,

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About