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:
Yitzchak Scott-Thoennes
Date:
March 13, 2007 18:49
Subject:
Re: test skipping based on $Config{extensions} (was: Re: [PATCH] Re: [PATCH] Re: Win32 modules & cygwin)
Message ID:
3576.66.212.64.234.1173836965.squirrel@66.212.64.234
Craig Berry wrote:
> 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.

I'd like to be consistent, and it seems the easiest way to get and
stay consistent is to rely on TEST and harness doing the right thing
and {known_,}extensions being kept correct for all platforms.

I also don't like the idea of cruft being added to a module just because
it's been added to the core.

> 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"?

I'd think it would mean occupying space under ext/.  I wouldn't
expect the modules under vms/ext or os2/OS2 to show up for other
platforms.  The Win32 modules are something of a special case
because they are shared by the cygwin and win32 platforms.


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