Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting author tests to be created and run for dzil test

I am trying to use several Dist::Zilla plugins to generate and run author tests. The only problem is that they are generated by dzil build and not run with dzil test. As an example, here are some lines in my 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.

Running dzil test however, only runs one of the created test files- 00-compile.t. unused-vars.t isn't even created until I run dzil build. In order to test all of the author tests created like this, I need to first run dzil build, cd into the new directory, then run dzil test. Then, when something fails, I have to work with the original copy, not the copy created by the build command. Rinse and repeat.

Is there a way to get the author tests to be generated at build time so that I can run them with dzil test without changing directories?

like image 931
Nate Glenn Avatar asked Nov 29 '12 01:11

Nate Glenn


1 Answers

dzil test --release is what you're looking for. And I would also strongly recommend you to try Dist::Zilla::PluginBundle::TestingMania

like image 63
creaktive Avatar answered Sep 17 '22 10:09

creaktive