如何修复这些失败的Perl测试?

时间:2015-07-13 12:34:43

标签: perl

使测试失败

我正在尝试构建Perl 5.16.3。但是,它在make test部分失败了。

Failed 2 tests out of 2246, 99.91% okay.
    ../cpan/Archive-Extract/t/01_Archive-Extract.t
    ../lib/h2ph.t
### Since not all tests were successful, you may want to run some of
### them individually and examine any diagnostic messages they produce.
### See the INSTALL document's section on "make test".
### You have a good chance to get more information by running
###   ./perl harness
### in the 't' directory since most (>=80%) of the tests succeeded.
### You may have to set your dynamic library search path,
### LD_LIBRARY_PATH, to point to the build directory:
###   setenv LD_LIBRARY_PATH `pwd`; cd t; ./perl harness
###   LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH; cd t; ./perl harness
###   export LD_LIBRARY_PATH=`pwd`; cd t; ./perl harness
### for csh-style shells, like tcsh; or for traditional/modern
### Bourne-style shells, like bash, ksh, and zsh, respectively.
u=99.10  s=23.36  cu=7851.09  cs=326.70  scripts=2246  tests=528321
makefile:868: recipe for target 'test' failed
make: *** [test] Error 1

使用线束进行故障排除

我不知道如何处理may have to set的模糊性,所以我一开始就忽略了它。这是输出(错误打印在下面)。

$ cd t; ./perl harness ../cpan/Archive-Extract/t/01_Archive-Extract.t ../lib/h2ph.t
../cpan/Archive-Extract/t/01_Archive-Extract.t ..
Dubious, test returned 154 (wstat 39424, 0x9a00)
Failed 154/1704 subtests
    (less 534 skipped subtests: 1016 okay)
../lib/h2ph.t ...................................
Failed 2/6 subtests

Test Summary Report
-------------------
../cpan/Archive-Extract/t/01_Archive-Extract.t (Wstat: 39424 Tests: 1704 Failed: 154)
  Failed tests:  87, 89-94, 98, 100-105, 111, 113-118, 122
                124-129, 255, 257-262, 266, 268-273, 495
                497-502, 506, 508-513, 567, 569-574, 578
                580-585, 615, 617-622, 626, 628-633, 711
                713-718, 722, 724-729, 807, 809-814, 818
                820-825, 879, 881-886, 890, 892-897, 903
                905-910, 914, 916-921, 927, 929-934, 938
                940-945
  Non-zero exit status: 154
../lib/h2ph.t                                 (Wstat: 0 Tests: 6 Failed: 2)
  Failed tests:  5-6
Files=2, Tests=1710, 38 wallclock secs ( 3.60 usr  0.15 sys + 16.97 cusr  6.03 csys = 26.75 CPU)
Result: FAIL

这是错误。

$ cd t; ./perl harness ../cpan/Archive-Extract/t/01_Archive-Extract.t ../lib/h2ph.t
#   Failed test 'extract() for 'double_dir.zip' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'x/w''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'x/w'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/x/w' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/x''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/x'

#   Failed test 'extract() for 'double_dir.zip' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'x/w''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'x/w'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/x/w' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/x''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/x'

#   Failed test 'extract() for 'y.jar' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.jar' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.zip' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.zip' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.par' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.par' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.war' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.war' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.ear' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'y.ear' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '2'

#   Failed test 'Found correct output file 'y/z''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'y/z'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y/z' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/y'

#   Failed test 'extract() for 'x.jar' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.jar' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.par' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.par' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.zip' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.zip' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.ear' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.ear' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.war' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'

#   Failed test 'extract() for 'x.war' reports success (PP: 0 Bin: 1)'
#   at t/01_Archive-Extract.t line 478.

#   Failed test 'Found correct number of output files ()'
#   at t/01_Archive-Extract.t line 491.
#          got: '0'
#     expected: '1'

#   Failed test 'Found correct output file 'a''
#   at t/01_Archive-Extract.t line 498.
#          got: undef
#     expected: 'a'

#   Failed test 'Output file '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out/a' exists'
#   at t/01_Archive-Extract.t line 501.

#   Failed test 'Extract dir found'
#   at t/01_Archive-Extract.t line 503.

#   Failed test 'Extract dir exists'
#   at t/01_Archive-Extract.t line 505.

#   Failed test 'Extract dir is expected '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out''
#   at t/01_Archive-Extract.t line 507.
#          got: undef
#     expected: '/home/osmc/perl-5.16.3/perl-5.16.3/cpan/Archive-Extract/t/out'
# Looks like you failed 154 tests of 1704.
# Failed test 5 - preamble compiles at ../lib/h2ph.t line 49
#      got 'Illegal declaration of subroutine main::__has_include at _h2ph_pre.ph line 754.
# '
# expected /(?^:syntax OK$)/
# Failed test 6 - output free of warnings at ../lib/h2ph.t line 56
#      got "Illegal character in prototype for main::__has_include : STR at _h2ph_pre.ph line 754.\nCompilation failed in require at lib/h2ph.pht line 1.\nCompilation failed in require at -e line 1.\n"
# expected ""

然后我再次尝试使用cd ..; export LD_LIBRARY_PATH=$(pwd); cd t; ./perl harness ../cpan/Archive-Extract/t/01_Archive-Extract.t ../lib/h2ph.t,但相同的测试失败了。

我正在使用Raspberry Pi运行Raspbian(基于Debian)。如何在没有测试失败的情况下构建Perl?

调查来源

我看了测试的source code,但我真的不明白。例如,第一个失败的错误状态

Failed test 'extract() for 'double_dir.zip' reports success (PP: 0 Bin: 1)'
at t/01_Archive-Extract.t line 478.

../cpan/Archive-Extract/t/01_Archive-Extract.t中,第478行是

ok( $rv, "extract() for '$archive' reports success ($cfg)");

我无法真正看到它在这一点上试图测试的内容。 (此测试的其余部分可以查看here

我已安装,然后尝试通过CPAN升级Archive::Extract

根据this answer,我尝试使用make install保留,然后通过CPAN升级Archive::Extractmake install工作正常。 (我在/opt中与我的发行版的Perl并行安装,所以我使用了./Configure -des -Dprefix=/opt/perl-5.16.3-LMS -Dusethreads。)

然后我尝试通过CPAN升级Archive::Extract。安装被杀,然后留下了某种悬空工作,虽然引用的pid不存在。我按照建议尝试升级CPAN本身,但该安装也被杀死了。 (这有相同的输出,但我没有说话。)

osmc@osmc:/opt/perl-5.16.3-LMS/bin$ ./perl -MCPAN -eshell
Enter 'h' for help.

cpan[1]> install Archive::Extract
Reading '/home/osmc/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Reading '/home/osmc/.cpan/sources/modules/02packages.details.txt.gz'
  Database was generated on Sun, 19 Jul 2015 06:17:02 GMT
  HTTP::Date not available
..............
  New CPAN.pm version (v2.10) available.
  [Currently running version is v1.9800]
  You might want to try
    install CPAN
    reload cpan
  to both upgrade CPAN.pm and run the new version without leaving
  the current session.


......................................................Killed
osmc@osmc:/opt/perl-5.16.3-LMS/bin$ ./perl -MCPAN -eshell
Terminal does not support AddHistory.

There seems to be running another CPAN process (pid 13152).  Contacting...
Other job not responding. Shall I overwrite the lockfile '/home/osmc/.cpan/.lock'? (Y/n) [y] y

cpan shell -- CPAN exploration and modules installation (v1.9800)
Enter 'h' for help.

cpan[1]> install CPAN

我不确定是否相关,但根据我对this answer的评论,我从来没有真正让CPAN在这个系统上工作。

1 个答案:

答案 0 :(得分:1)

由于Archive::Extract位于CPAN上,您拥有的一个选项是使用您刚刚构建的make install perl,然后更新到最新版本的Archive::Extract,并查看测试失败是否仍然存在。

如果故障仍然存在,请切换到Archive::Extract的构建目录并在调试模式下运行测试:

$ perl -Iblib t\01_Archive-Extract.t 1

(您可能希望将输出保存到文件中)。

从它的外观来看,至少有一些失败与涉及压缩tar文件(gzip,xz,bzip等)的测试有关。一种可能性是您的tar和/或其他命令行实用程序与Archive::Extract期望的内容不匹配。

调试输出应该有助于查明问题。请使用运行测试的调试输出更新您的问题。无需使用pastebin或类似服务。无需发布您尝试安装的模块的源代码,因为它在CPAN上可用。

更新:从CPAN安装模块不需要使用CPAN shell。

下载latest tarball,解压缩,然后执行:

$ wget https://cpan.metacpan.org/authors/id/B/BI/BINGOS/Archive-Extract-0.76.tar.gz
$ tar -xvf Archive-Extract-0.76.tar.gz
$ cd Archive-Extract-0.76
$ perl Makefile.PL
$ nmake
$ perl -Iblib t\1_Archive-Extract.t 1