如何在通过 perlbrew 安装 perl 失败时重新运行测试?

How to rerun test while installing perl via perlbrew fails?

我通过 perlbrew 安装 perl-5.28.1。一些测试失败:

../cpan/Tie-RefHash/t/storable.t ................................... ok
../cpan/Tie-RefHash/t/threaded.t ................................... skipped: -- threads aren't enabled in your perl, or Scalar::Util::weaken is missing
#   Failed test 'timelocal year for 1970 1 2 0 0 0'
#   at t/Local.t line 109.
#          got: '170'
#     expected: '70'

#   Failed test 'timegm year for 1970 1 2 0 0 0'
#   at t/Local.t line 124.
#          got: '170'
#     expected: '70'
# Looks like you failed 2 tests of 187.
../cpan/Time-Local/t/Local.t ....................................... 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/187 subtests 
    (less 8 skipped subtests: 177 okay)
../cpan/Time-Piece/t/01base.t ...................................... ok
...
Test Summary Report
-------------------
../cpan/Time-Local/t/Local.t                                     (Wstat: 512 Tests: 187 Failed: 2)
  Failed tests:  6, 12
  Non-zero exit status: 2
Files=2653, Tests=1157584, 928 wallclock secs (116.85 usr 11.01 sys + 603.60 cusr 55.01 csys = 786.47 CPU)
Result: FAIL
makefile:835: recipe for target 'test_harness' failed
make: *** [test_harness] Error 2
##### Brew Failed #####

如何只重新运行这个失败的测试?

要运行单个perl的测试文件,可以使用

t/TEST ../cpan/Time-Local/t/Local.t

这将是来自以下目录的 运行:

cd "${PERLBREW_ROOT:-$HOME/perl5/perlbrew}"
cd build/perl-5.x.y/perl-5.x.y

请参阅同一文件夹中 INSTALL 文件的 如果 make test 不起作用怎么办? 部分以了解有关测试的更多信息 perl