2016-06-12 10 views
2

Это очень похоже на my recent question, за исключением того, что на этот раз тесты дыма CGI::Github::Webhook - это fine on Travis CI, а также локально (оба, с OS установлен Perl 5.22 и с Perl 5.24, встроенным и установленным через Perlbrew, см. Ниже), но fail in all but one CPAN Testers report.Испытания на дым не срабатывают для большинства CPANTesters, но работают нормально на Travis CI и локально под perlbrew-built 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 Testers выходит из строя для версии 0,04.

+0

Вы знаете, какая версия каждого необходимого модуля была использована тестерами? – melpomene

+0

@melpomene: Возможно видно в отчетах. По крайней мере, я помню, что нашел (и исправил) проблемы, когда Moo <2 был использован таким образом. –

ответ

3

Возможно, вы получаете различное сочетание библиотек с perlbrew, чем с установкой ванильного cpan. Из сообщений об ошибках, похоже, что не хватает нескольких зависимостей.

Я попытался установить через CPAN на Perl (5.20.1), тесты, похоже, не из-за предупреждения будут вставлены в выходной CGI по пути :: Крошечный

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 

Вот StackTrace для этого предупреждение:

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'. Познакомьтесь с вашими результатами позже, спасибо! –