[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recent debian perl tests failures without . in @INC

From: Patrice Dumas
Subject: Re: recent debian perl tests failures without . in @INC
Date: Thu, 31 Aug 2017 14:37:57 +0200
User-agent: Mutt/1.5.20 (2009-12-10)

On Wed, Aug 30, 2017 at 08:01:50PM +0100, Gavin Smith wrote:
> Do you know if running "make check" still works? If so, maybe we can ignore 
> it 
> for now.

No, it fails for thoses tests, and that's actually how I found it.

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

That's a possibility, but compared to what I propose below, the tests
won't work when manually started.  But maybe it is possible to explain
it in a README somewhere that -I . needs to be added to perl flags.

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

Indeed, for out of source build, chances are that all the tests fail.

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

Another possibility could be to replace that line by a call to
ModulePath, like what is done in tests not depending on t/test_utils.pl,

  require Texinfo::ModulePath;
  Texinfo::ModulePath::init(undef, undef, 'updirs' => 2);

ModulePath will add 'top_srcdir'/tp tp @INC allowing to find


reply via email to

[Prev in Thread] Current Thread [Next in Thread]