简体   繁体   中英

How to rerun test while installing perl via perlbrew fails?

I installing perl-5.28.1 via perlbrew. Some tests fail:

../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 #####

How to rerun only this failed test?

To run a single one of perl 's test file, you can use

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

This would be run from the following directory:

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

See the What if make test doesn't work? section of the INSTALL file in the same folder for more on testing perl .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM