这与我最近的问题非常相似,除了这一次,CGI::Github::Webhook的烟雾测试在 Travis CI和本地都很好(两者都安装了操作系统 Perl 5.22 和构建并安装了 Perl 5.24通过 Perlbrew,见下文),但除了一份 CPAN 测试报告外,其他所有报告都失败了。
最常见的错误如下所示:
PERL_DL_NONLAZY=1 "/bbbike/perl-5.24.0/bin/perl5.24.0" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/auth-fail.t ............ ok
t/author-critic.t ........ skipped: these tests are for testing by the author
t/author-pod-coverage.t .. skipped: these tests are for testing by the author
t/author-pod-syntax.t .... skipped: these tests are for testing by the author
t/basic-functionality.t .. ok
Attempt to reload List/Util.pm aborted.
Compilation failed in require at /bbbike/perl-5.24.0/lib/site_perl/5.24.0/Sub/Exporter/Progressive.pm line 9.
BEGIN failed--compilation aborted at /bbbike/perl-5.24.0/lib/site_perl/5.24.0/Sub/Exporter/Progressive.pm line 9.
Compilation failed in require at /bbbike/perl-5.24.0/lib/site_perl/5.24.0/Devel/GlobalDestruction.pm line 11.
BEGIN failed--compilation aborted at /bbbike/perl-5.24.0/lib/site_perl/5.24.0/Devel/GlobalDestruction.pm line 11.
Compilation failed in require at /bbbike/perl-5.24.0/lib/site_perl/5.24.0/Moo/_Utils.pm line 26.
BEGIN failed--compilation aborted at /bbbike/perl-5.24.0/lib/site_perl/5.24.0/Moo/_Utils.pm line 26.
Compilation failed in require at /bbbike/perl-5.24.0/lib/site_perl/5.24.0/Moo.pm line 12.
BEGIN failed--compilation aborted at /bbbike/perl-5.24.0/lib/site_perl/5.24.0/Moo.pm line 12.
Compilation failed in require at /tmpfs/.cpan-build-cpansand/2016060903/CGI-Github-Webhook-0.04-pS8kOL/blib/lib/CGI/Github/Webhook.pm line 11.
BEGIN failed--compilation aborted at /tmpfs/.cpan-build-cpansand/2016060903/CGI-Github-Webhook-0.04-pS8kOL/blib/lib/CGI/Github/Webhook.pm line 11.
Compilation failed in require at ./cgitest.pl line 10.
BEGIN failed--compilation aborted at ./cgitest.pl line 10.
script /cgi-bin/cgitest.pl generated no valid headers at /opt/perl-5.24.0/lib/site_perl/5.24.0/CGI/Test.pm line 468.
Use of uninitialized value $in_fname in unlink at /opt/perl-5.24.0/lib/site_perl/5.24.0/CGI/Test.pm line 469.
Use of uninitialized value $in_fname in concatenation (.) or string at /opt/perl-5.24.0/lib/site_perl/5.24.0/CGI/Test.pm line 469.
can't unlink : No such file or directory at /opt/perl-5.24.0/lib/site_perl/5.24.0/CGI/Test.pm line 469.
在本地使用我的 perlbrew 构建的 Perl 5.24,它看起来像这样:
[…]-Github-Webhook-0.04 → perlbrew use 5.24.0
[…]-Github-Webhook-0.04 → which perl
/home/abe/perl5/perlbrew/perls/perl-5.24.0/bin/perl
[…]-Github-Webhook-0.04 → perl -v
This is perl 5, version 24, subversion 0 (v5.24.0) built for x86_64-linux-thread-multi
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2016, Larry Wall
Perl may be copied […]
[…]-Github-Webhook-0.04 → perl Makefile.PL
Generating a Unix-style Makefile
Writing Makefile for CGI::Github::Webhook
Writing MYMETA.yml and MYMETA.json
[…]-Github-Webhook-0.04 → prove -l
t/auth-fail.t ............ ok
t/author-critic.t ........ skipped: these tests are for testing by the author
t/author-pod-coverage.t .. skipped: these tests are for testing by the author
t/author-pod-syntax.t .... skipped: these tests are for testing by the author
t/basic-functionality.t .. ok
t/cgi-test-auth-fail.t ... ok
t/cgi-test.t ............. ok
t/methods-non-json.t ..... ok
t/methods.t .............. ok
t/release-kwalitee.t ..... skipped: these tests are for release candidate testing
All tests successful.
Files=10, Tests=52, 1 wallclock secs ( 0.04 usr 0.00 sys + 0.66 cusr 0.07 csys = 0.77 CPU)
Result: PASS
即使我以与 CPAN 测试人员报告中相同的方式调用它,它对我来说也不会失败:
[…]-Github-Webhook-0.04 → PERL_DL_NONLAZY=1 /home/abe/perl5/perlbrew/perls/perl-5.24.0/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/auth-fail.t ............ ok
t/author-critic.t ........ skipped: these tests are for testing by the author
t/author-pod-coverage.t .. skipped: these tests are for testing by the author
t/author-pod-syntax.t .... skipped: these tests are for testing by the author
t/basic-functionality.t .. ok
t/cgi-test-auth-fail.t ... ok
t/cgi-test.t ............. ok
t/methods-non-json.t ..... ok
t/methods.t .............. ok
t/release-kwalitee.t ..... skipped: these tests are for release candidate testing
All tests successful.
Files=10, Tests=52, 1 wallclock secs ( 0.02 usr 0.02 sys + 0.68 cusr 0.05 csys = 0.77 CPU)
Result: PASS
但是我不明白为什么我无法重现这些错误,尽管几乎所有 CPAN 测试人员报告都失败了 0.04 版本。