[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: recent debian perl tests failures without . in @INC
From: |
Gavin Smith |
Subject: |
Re: recent debian perl tests failures without . in @INC |
Date: |
Wed, 30 Aug 2017 20:01:50 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Tue, Aug 29, 2017 at 11:48:17AM +0200, Patrice Dumas wrote:
> Hello,
>
> Recent perl in debian do not have . in @INC anymore, and it will be
> upstream in perl 5.26.
> https://lists.debian.org/debian-devel-announce/2016/08/msg00013.html
It seems very awkward.
Do you know if running "make check" still works? If so, maybe we can ignore it
for now.
If not, "-I ." could be added to AM_T_LOG_FLAGS in tp/Makefile.am. I'm
not going to do this myself right now, because there is quite a large
chance I won't fix the issue correctly if I can't test it with the new
version of perl.
> It seems to me that the difference between tests that work and tests
> that do not is the presence or not, in BEGIN block of
> if (defined($ENV{'top_srcdir'})) {unshift @INC,
> File::Spec->catdir($ENV{'top_srcdir'}, 'tp');
I see that line is in several of the tests. Texinfo/ModulePath.pm will
be in the build dir though, so this might not be enough.
> It seems to me that Texinfo/ModulePath.pm is generated so will be in the
> build directory, and that it can set top_srcdir carefully, not
> overwriting it if not needed. It would also probably be good to have
> tests working even if top_srcdir is not set.
>
> One possibility could be to add something like the following in every
> test:
> BEGIN {
> if (not (grep {$_ eq '.'} @INC)) {push @INC, '.';}
> }
>
> And maybe the line:
> if (defined($ENV{'top_srcdir'})) {unshift @INC,
> File::Spec->catdir($ENV{'top_srcdir'}, 'tp');
> could be removed, but maybe with a comment stating that it will only
> work for out of source builds if Texinfo/ModulePath.pm is generated in
> the build tree.
I think it depends on where the tests are being run from, so usually the
build dir will be ".". 'top_srcdir' had to be added to @INC to find
t/test_utils.pl in tests like t/80include.t.