为dzil测试创建并运行作者测试

Nat*_*enn 5 testing perl plugins module dist-zilla

我试图使用几个Dist :: Zilla插件来生成和运行作者测试.唯一的问题是它们是由生成dzil build而不是与之一起运行dzil test.举个例子,我的dist.ini中有一些行:

[Test::Compile]     ; Create t/00-compile.t
[Test::UnusedVars]  ; Create xt/unused-vars.t
[RunExtraTests]     ; run the xt/ tests when dzil test is run.
Run Code Online (Sandbox Code Playgroud)

运行dzil test然而,只有运行创建的测试文件-之一00-compile.t.unused-vars.t甚至在我跑步之前都没有创造dzil build.为了测试这样创建的所有作者测试,我需要先运行dzil build,cd进入新目录,然后运行dzil test.然后,当某些内容失败时,我必须使用原始副本,而不是构建命令创建的副本.冲洗并重复.

有没有办法在构建时生成作者测试,以便我可以在dzil test不更改目录的情况下运行它们?

cre*_*ive 6

dzil test --release是你在找什么.我还强烈建议您尝试Dist :: Zilla :: PluginBundle :: TestingMania