On 07/31/2009 01:51 PM, Jonathan Swartz wrote:
> There are certain tests in my distribution that I don't want end users
> to run. I want to run them during development, and I also want anyone
> else contributing to the distribution to run them. These are typically
> related to static analysis of the code, e.g. perl critic, perl tidy and
> pod checking - it makes no sense to risk having these fail for end users.
> 
> Is there a standard for signifying internal-only tests, and for make
> test to figure out when they should run?

Good question. I use TEST_AUTHOR for things like this, plus a few other
specific ones, such as TEST_CRITIC, for tests that end users *can* run,
but only if they specifically enable it.

To figure out if they should run in a test, I do:

use Test::More;

if (!$ENV{TEST_AUTHOR}) {
    plan skip_all => 'Set the environment variable TEST_AUTHOR to enable
this test';
}
plan tests => 1;

I've also started moving the tests themselves from MANIFEST to MANIFEST.skip


-- 
Greg Sabino Mullane g...@endpoint.com
End Point Corporation
PGP Key: 0x14964AC8

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to