develooper Front page | perl.perl5.porters | Postings from March 2007

Re: test skipping based on $Config{extensions} (was: Re: [PATCH] Re: [PATCH] Re: Win32 modules & cygwin)

Thread Previous | Thread Next
From:
Craig Berry
Date:
March 13, 2007 12:34
Subject:
Re: test skipping based on $Config{extensions} (was: Re: [PATCH] Re: [PATCH] Re: Win32 modules & cygwin)
Message ID:
c9ab31fc0703131233p5a3d1fc6ld949ef3e98b9f3dd@mail.gmail.com
On 3/13/07, Yitzchak Scott-Thoennes <sthoenna@efn.org> wrote:
> On Tue, Feb 27, 2007 at 02:43:29AM -0800, Yitzchak Scott-Thoennes wrote:
> > Steve Hay wrote:
> > > Yitzchak Scott-Thoennes wrote:
> > >> On Mon, Feb 26, 2007 at 01:28:51PM +0000, Steve Hay wrote:
> > >>> Thanks, applied as #30409.
> > >>
> > >> Um, given Craig's comment in
> > >> http://nntp.perl.org/group/perl.perl5.porters/121449, I think I'd
> > >> rather this were reverted.
> > >>
> > >> Since TEST and harness automatically handle skipping known but not
> > >> built extensions' tests, $Config{extensions}-checking code shouldn't
> > >> clutter up the tests.
> > >
> > > I haven't investigated this at all yet, but I recall no so long ago
> > > Nicholas going through lots of test files and having tests skipped if
> > > modules weren't built.
> > >
> > > A quick look in Changes reveals quite a few such changes, e.g.:
> > >
> > > Skip Devel::PPPort tests if Devel::PPPort was not built:
> > > http://public.activestate.com/cgi-bin/perlbrowse/p/22953
> > >
> > > Skip re tests if re was not built:
> > > http://public.activestate.com/cgi-bin/perlbrowse/p/22952
> > >
> > > Skip B tests if B was not built:
> > > http://public.activestate.com/cgi-bin/perlbrowse/p/22951
> > >
> > > and others...
> > >
> > > I'm sure all those changes weren't unnecessary, but I've forgotten what
> > > the motivation for them was.  Whatever it was might also apply to
> > > Win32CORE and Win32API.
> >
> > FWIW, Nicholas added the automatic skipping to TEST and harness in
> > http://public.activestate.com/cgi-bin/perlbrowse/p/23448
> > so the behavior wasn't there at the time of the earlier patches
> > you mention.
> >
> > Nicholas?  Was that intended to be in addition to or instead of
> > per-test skipping?
>
>
> It still makes sense to me to revert #30409, unless other people
> object.

I don't strongly object, but I don't see any harm in leaving it in.
More generally, I don't see any easy, maintenance-free way to do this
right.

If the "Am I built?" check is close to the thing that has to be
tested, then the person maintaining that thing doesn't have to have
knowledge of external bits and pieces that must  be modified so the
test will be excluded when necessary.  But then a very similar check
is expected to be maintained in a bazillion places, and experience
shows that isn't a very realistic expectation.

If the difference between known extensions and built extensions is
used to determine which tests to run and which to exclude, then
whoever adds something new under ext/ should make sure the
known_extensions list gets updated on all platforms,.  But experience
shows that isn't a realistic expectation either (though perhaps it is
something that eventually needs to be done anyway).

On a related note, I find I am no longer confident I understand what
"known extension" means.   Porting/Glossary says, "all XS extensions
included in the package."  It never occurred to me to add the Win32
extensions to $Config{known_extensions} on VMS until this thread
started because there is no meaningful sense in which those extensions
will ever be included in a non-Win32 build.  Is merely occupying space
in the source tarball what we mean by "included"?

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About