David Cantrell wrote:
On Fri, Jul 31, 2009 at 10:51:57AM -0700, Jonathan Swartz wrote:
Is there a standard for signifying internal-only tests, and for make
test to figure out when they should run?
The normal way is to have them skip unless some magic environment
variable is set.
Perl::Critic used to do this and then we'd get bug reports from people who used
the same environment variables to run their author tests. Also, Mr. Lester had
the tests run if a .svn directory existed. Of course, someone then did a
checkout and complained when those tests failed.
So, you now have to actively request that the P::C author tests be run. All
the author tests are in xt/author. There is a custom Module::Build authortest
target.
The basic logic of that is
$self->test_files( qw< t xt/author > );
$self->recursive_test_files(1);
$self->depends_on('test');
http://perlcritic.tigris.org/source/browse/*checkout*/perlcritic/trunk/distributions/Perl-Critic/inc/Perl/Critic/Module/Build.pm