【发布时间】:2018-11-22 19:38:03
【问题描述】:
我有一个使用 MakeMaker 的 Makefile.PL 用于我的 perl 模块,如下所示:
#!/usr/bin/perl
use strict;
use warnings FATAL => 'all';
use 5.008;
use ExtUtils::MakeMaker;
WriteMakefile
(
NAME => 'MyModule',
AUTHOR => 'Subu',
LICENSE => 'perl',
PREREQ_PM => {
'File::Basename' => '0',
},
TEST_REQUIRES => {
'Test::More' => '0.47',
'Test::MockModule' => 'v0.170.0',
'Test::MockObject' => '1.20180705',
'Devel::Cover' => '1.31',
'Test::File' => '1.443'
},
BUILD_REQUIRES => {
'Log::Log4perl' => '1.49',
'JSON::Parse' => '0.55',
'Time::Piece' => '1.33',
'Text::CSV' => '1.97'
},
EXE_FILES => [
'src/main/perl/MyModule/main.pl'
],
test => {TESTS => 'src/test/perl/MyModule/*/*.t
src/test/perl/MyModule/*/*/*.t'}
);
我可以使用
运行测试perl Makefile.PL
make
make test
但是,我希望使用 TAP::Harness::Junit 格式化输出。如何在 makefile 中指定?
我知道我可以用证明来运行测试
prove --formatter TAP::Formatter::JUnit *.t
但我想知道是否有办法将其插入到我的 makefile 中。
【问题讨论】: