2016-06-12 16 views
2

這與my recent question非常相似,只不過這次,CGI::Github::Webhook的煙霧測試是fine on Travis CI以及本地(包括操作系統安裝了Perl 5.22,以及通過Perlbrew構建和安裝的Perl 5.24,見下文),但是fail in all but one CPAN Testers report大多數CPANTesters的煙霧測試失敗,但對特拉維斯CI和當地perlbrew生成的Perl的工作正常

最常見的錯誤是這樣的:

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 

但是我不明白爲什麼我可以' t重現了這些錯誤,儘管幾乎每個CPAN測試人員的報告都在0.04版本中失敗。

+0

是否知道測試人員使用每個必備模塊的哪個版本? – melpomene

+0

@melpomene:可能在報告中可見。至少我記得當Moo <2被這樣使用時發現(和修正)了問題。 –

回答

3

你可能會得到一個與perlbrew庫不同的組合,比使用香草cpan安裝。從您的錯誤消息看,它看起來像缺少一些依賴關係。

我試圖通過CPAN上的Perl(5.20.1)安裝,測試似乎忽視由於通過警告::路徑微小

cpan CGI::Github::Webhook 

... skipping dependencies ... 

CGI::Test is up to date (1.111). 
    ABE/CGI-Github-Webhook-0.04.tar.gz 
    Has already been unwrapped into directory /home/felix/.cpan/build/CGI-Github-Webhook-0.04-10wq5g 
    ABE/CGI-Github-Webhook-0.04.tar.gz 
    Has already been prepared 
Running make for A/AB/ABE/CGI-Github-Webhook-0.04.tar.gz 
cp static-badges/errored.png blib/lib/auto/share/module/CGI-Github-Webhook/errored.png 
cp static-badges/failed.svg blib/lib/auto/share/module/CGI-Github-Webhook/failed.svg 
cp static-badges/failed.png blib/lib/auto/share/module/CGI-Github-Webhook/failed.png 
cp static-badges/success.svg blib/lib/auto/share/module/CGI-Github-Webhook/success.svg 
cp static-badges/errored.svg blib/lib/auto/share/module/CGI-Github-Webhook/errored.svg 
cp static-badges/success.png blib/lib/auto/share/module/CGI-Github-Webhook/success.png 
cp lib/CGI/Github/Webhook.pm blib/lib/CGI/Github/Webhook.pm 
Manifying 1 pod document 
    ABE/CGI-Github-Webhook-0.04.tar.gz 
    /usr/bin/make -- OK 
Running make test 
Skip blib/lib/auto/share/module/CGI-Github-Webhook/success.png (unchanged) 
Skip blib/lib/auto/share/module/CGI-Github-Webhook/errored.svg (unchanged) 
Skip blib/lib/auto/share/module/CGI-Github-Webhook/failed.svg (unchanged) 
Skip blib/lib/auto/share/module/CGI-Github-Webhook/errored.png (unchanged) 
Skip blib/lib/auto/share/module/CGI-Github-Webhook/failed.png (unchanged) 
Skip blib/lib/auto/share/module/CGI-Github-Webhook/success.svg (unchanged) 
PERL_DL_NONLAZY=1 "/usr/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 ............ 1/3 
# Failed test 'CGI output as expected' 
# at t/auth-fail.t line 28. 
#   got: 'Unrecognized option(s) passed to make_path(): err at /usr/local/share/perl/5.20.1/Path/Tiny.pm line 1117. 
# Content-Type: text/plain; charset=utf-8 
# 
# Authentication failed 
# ' 
#  expected: 'Content-Type: text/plain; charset=utf-8 
# 
# Authentication failed 
# ' 
# Looks like you failed 1 test of 3. 
t/auth-fail.t ............ Dubious, test returned 1 (wstat 256, 0x100) 
Failed 1/3 subtests 
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 .. 1/12 
# Failed test 'CGI output as expected' 
# at t/basic-functionality.t line 33. 
#   got: 'Unrecognized option(s) passed to make_path(): err at /usr/local/share/perl/5.20.1/Path/Tiny.pm line 1117. 
# Content-Type: text/plain; charset=utf-8 
# 
# Successfully triggered 
# ' 
#  expected: 'Content-Type: text/plain; charset=utf-8 
# 
# Successfully triggered 
# ' 

# Failed test 'CGI output as expected' 
# at t/basic-functionality.t line 65. 
#   got: 'Unrecognized option(s) passed to make_path(): err at /usr/local/share/perl/5.20.1/Path/Tiny.pm line 1117. 
# Content-Type: text/plain; charset=utf-8 
# 
# Trigger failed 
# ' 
#  expected: 'Content-Type: text/plain; charset=utf-8 
# 
# Trigger failed 
# ' 
# Looks like you failed 2 tests of 12. 
t/basic-functionality.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/12 subtests 

t/cgi-test-auth-fail.t ... ok 
t/cgi-test.t ............. ok 
t/methods-non-json.t ..... Unrecognized option(s) passed to make_path(): err at /usr/local/share/perl/5.20.1/Path/Tiny.pm line 1117. 
t/methods-non-json.t ..... ok  
t/methods.t .............. Unrecognized option(s) passed to make_path(): err at /usr/local/share/perl/5.20.1/Path/Tiny.pm line 1117. 
t/methods.t .............. ok  
t/release-kwalitee.t ..... skipped: these tests are for release candidate testing 

Test Summary Report 
------------------- 
t/auth-fail.t   (Wstat: 256 Tests: 3 Failed: 1) 
    Failed test: 2 
    Non-zero exit status: 1 
t/basic-functionality.t (Wstat: 512 Tests: 12 Failed: 2) 
    Failed tests: 2, 8 
    Non-zero exit status: 2 
Files=10, Tests=52, 3 wallclock secs (0.10 usr 0.02 sys + 2.41 cusr 0.25 csys = 2.78 CPU) 
Result: FAIL 
Failed 2/10 test programs. 3/52 subtests failed. 
Makefile:878: recipe for target 'test_dynamic' failed 
make: *** [test_dynamic] Error 255 
    ABE/CGI-Github-Webhook-0.04.tar.gz 
    /usr/bin/make test -- NOT OK 
//hint// to see the cpan-testers results for installing this module, try: 
    reports ABE/CGI-Github-Webhook-0.04.tar.gz 

及彼插入CGI輸出是一個堆棧跟蹤警告:

cpan look CGI::Github::Webhook 

/.cpan/build/CGI-Github-Webhook-0.04-wA0tww/t $ perl -d -I../lib cgi/basic.pl 'echo foo' 

Loading DB routines from perl5db.pl version 1.44 
Editor support available. 

Enter h or 'h h' for help, or 'man perldebug' for more help. 

Unrecognized option(s) passed to make_path(): err at /usr/local/share/perl/5.20.1/Path/Tiny.pm line 1117. 
at /usr/local/share/perl/5.20.1/File/Path.pm line 115. 
    File::Path::mkpath("/tmp/XtmjrOLDl8/auto/share/module") called at /usr/local/share/perl/5.20.1/Path/Tiny.pm line 1117 
    Path::Tiny::mkpath(Path::Tiny=ARRAY(0xa6e67cc)) called at /usr/local/share/perl/5.20.1/Test/File/ShareDir/TempDirObject.pm line 75 
    Test::File::ShareDir::TempDirObject::_module_tempdir(Test::File::ShareDir::TempDirObject=HASH(0xa5b316c)) called at /usr/local/share/perl/5.20.1/Test/File/ShareDir/TempDirObject.pm line 112 
    Test::File::ShareDir::TempDirObject::_module_share_target_dir(Test::File::ShareDir::TempDirObject=HASH(0xa5b316c), "CGI::Github::Webhook") called at /usr/local/share/perl/5.20.1/Test/File/ShareDir/TempDirObject.pm line 132 
    Test::File::ShareDir::TempDirObject::_install_module(Test::File::ShareDir::TempDirObject=HASH(0xa5b316c), "CGI::Github::Webhook") called at /usr/local/share/perl/5.20.1/Test/File/ShareDir.pm line 60 
    Test::File::ShareDir::import("Test::File::ShareDir", "-share", HASH(0xa416f90)) called at cgi/basic.pl line 9 
    main::BEGIN() called at cgi/basic.pl line 13 
    eval {...} called at cgi/basic.pl line 13 
main::(cgi/basic.pl:16): my $cgi = CGI->new(); 
+0

感謝您的回答。我很確定你遇到的問題是不同的,但我應該考慮的問題。如果缺少依賴關係,則可能是'Dist :: Zilla :: Plugin :: AutoPrereqs'的問題。稍後會仔細看看你的發現,謝謝! –

相關問題