test failure with "Can't locate foo/bar.pm in @INC"

gregor herrmann gregoa at debian.org
Fri Jan 3 19:40:07 GMT 2020


On Fri, 03 Jan 2020 21:43:35 +0900, Hideki Yamane wrote:

>  I couldn't fix autopkgtest failure 
>  https://salsa.debian.org/debian/tiarra/-/jobs/488604/raw
> 
> > autopkgtest [09:15:04]: test autodep8-perl-build-deps: /usr/share/pkg-perl-autopkgtest/runner build-deps
> > autopkgtest [09:15:04]: test autodep8-perl-build-deps: [-----------------------
> > t/010_main_Configuration/001_basic_test.t .. 
> > 1..25
> > not ok 1 - require Configuration::Preprocessor;
> > 
> > #   Failed test 'require Configuration::Preprocessor;'
> > #   at t/010_main_Configuration/001_basic_test.t line 9.
> > #     Tried to require 'Configuration::Preprocessor'.
> > #     Error:  Can't locate Configuration/Preprocessor.pm in @INC (you may need to install the Configuration::Preprocessor module) (@INC contains: /tmp/autopkgtest-lxc.iafycsmo/downtmp/autopkgtest_tmp/smokexk7aZP/t/010_main_Configuration/../../bundle /tmp/autopkgtest-lxc.iafycsmo/downtmp/autopkgtest_tmp/smokexk7aZP/t/010_main_Configuration/../../main /tmp/autopkgtest-lxc.iafycsmo/downtmp/autopkgtest_tmp/smokexk7aZP/t/010_main_Configuration/../../module /tmp/autopkgtest-lxc.iafycsmo/downtmp/autopkgtest_tmp/smokexk7aZP/blib/lib /tmp/autopkgtest-lxc.iafycsmo/downtmp/autopkgtest_tmp/smokexk7aZP/blib/arch /tmp/autopkgtest-lxc.iafycsmo/downtmp/autopkgtest_tmp/smokexk7aZP /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at (eval 10) line 2.
> > not ok 2 - require Configuration::Parser;
> > 
> > #   Failed test 'require Configuration::Parser;'
> > #   at t/010_main_Configuration/001_basic_test.t line 10.
> > #     Tried to require 'Configuration::Parser'.
> > #     Error:  Can't locate Configuration/Parser.pm in @INC (you may need to install the Configuration::Parser module) (@INC contains: /tmp/autopkgtest-lxc.iafycsmo/downtmp/autopkgtest_tmp/smokexk7aZP/t/010_main_Configuration/../../bundle /tmp/autopkgtest-lxc.iafycsmo/downtmp/autopkgtest_tmp/smokexk7aZP/t/010_main_Configuration/../../main /tmp/autopkgtest-lxc.iafycsmo/downtmp/autopkgtest_tmp/smokexk7aZP/t/010_main_Configuration/../../module /tmp/autopkgtest-lxc.iafycsmo/downtmp/autopkgtest_tmp/smokexk7aZP/blib/lib /tmp/autopkgtest-lxc.iafycsmo/downtmp/autopkgtest_tmp/smokexk7aZP/blib/arch /tmp/autopkgtest-lxc.iafycsmo/downtmp/autopkgtest_tmp/smokexk7aZP /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at (eval 11) line 2.
> > not ok 3 - require Configuration::Block;
> (snip)
> 
>  But local test are okay (with some warning) as below.
> 
> > $ perl t/*/*.t
> > 1..25
> > Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/\%PRE{ <-- HERE (.+?)}ERP\%/ at main/Configuration/Preprocessor.pm line 168.
> > ok 1 - require Configuration::Preprocessor;
> > Constants from lexical variables potentially modified elsewhere are deprecated. This will not be allowed in Perl 5.32 at main/Tiarra/Utils/DefineHelper.pm line 351.
> > Constants from lexical variables potentially modified elsewhere are deprecated. This will not be allowed in Perl 5.32 at main/Tiarra/Utils/DefineHelper.pm line 351.
> > Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/\%CODE{ <-- HERE (.*?)}EDOC\%/ at main/Configuration/Block.pm line 143.
> > ok 2 - require Configuration::Parser;
> > ok 3 - require Configuration::Block;
> (snip)
> > ok 25 - 2nd nested block has 'key4'
> 
> 
>  Could you give me some advice, please?

The difference is that for the smoke test during autopkgtest, by
default only t/ is copied to a temp dir; in your local test you have
the whole source tree.

Quick fix:

% cat debian/tests/pkg-perl/smoke-files
t/
main/
module/

Background:
https://perl-team.pages.debian.net/autopkgtest.html


Cheers,
gregor
 

-- 
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
   `-   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: Digital Signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-perl-maintainers/attachments/20200103/55aa4517/attachment.sig>


More information about the pkg-perl-maintainers mailing list