Subject: | Wrong perl used in tests (?) |
Most tests on my smokers fail like this:
...
# Failed test 'enable method --record'
# at t/Expect_Cli_Ios.t line 114.
# got: 'Can't locate Text/Diff.pm in @INC (you may need to install the Text::Diff module) (@INC contains: /home/cpansand/.cpan/build/2019101920/Mnet-5.04-1/blib/lib /home/cpansand/.cpan/build/2019101920/Mnet-5.04-1/blib/arch /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base . /home/cpansand/.cpan/build/2019101920/Mnet-5.04-1/blib/lib/Mnet//Depends) at /home/cpansand/.cpan/build/2019101920/Mnet-5.04-1/blib/lib/Mnet/Test.pm line 69.
# BEGIN failed--compilation aborted at /home/cpansand/.cpan/build/2019101920/Mnet-5.04-1/blib/lib/Mnet/Test.pm line 69.
# Compilation failed in require at -e line 5.
# BEGIN failed--compilation aborted at -e line 5.
# '
# expected: '1'
# Failed test 'enable method --replay'
# at t/Expect_Cli_Ios.t line 124.
# got: 'Can't locate Text/Diff.pm in @INC (you may need to install the Text::Diff module) (@INC contains: /home/cpansand/.cpan/build/2019101920/Mnet-5.04-1/blib/lib /home/cpansand/.cpan/build/2019101920/Mnet-5.04-1/blib/arch /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base . /home/cpansand/.cpan/build/2019101920/Mnet-5.04-1/blib/lib/Mnet//Depends) at /home/cpansand/.cpan/build/2019101920/Mnet-5.04-1/blib/lib/Mnet/Test.pm line 69.
# BEGIN failed--compilation aborted at /home/cpansand/.cpan/build/2019101920/Mnet-5.04-1/blib/lib/Mnet/Test.pm line 69.
# Compilation failed in require at -e line 5.
# BEGIN failed--compilation aborted at -e line 5.
# '
# expected: '1'
# Looks like you failed 2 tests of 8.
t/Expect_Cli_Ios.t .......
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/8 subtests
... (etc) ...
It seems that the wrong perl exectuable is used here. @INC looks like system perl is called, but the CPAN distribution was built with another perl. Usually the fix in such situations is to use $^X, or to make sure that the correct shebang is substituted before running the tests.