shipit icon indicating copy to clipboard operation
shipit copied to clipboard

set TEST_AUTHOR

Open mephinet opened this issue 12 years ago • 2 comments

Test::Perl::Critic states as recommended usage for CPAN distribution authors to make the execution of the tests dependent on the existence of a TEST_AUTHOR environment variable - cf https://metacpan.org/module/Test::Perl::Critic#SYNOPSIS

I think it is a good idea to set this variable during the "disttest" step, so that these tests will be executed when shipit is performing the tests.

mephinet avatar Jun 09 '13 20:06 mephinet

Test::Perl::Critic states as recommended usage for CPAN distribution authors to make the execution of the tests dependent on the existence of a TEST_AUTHOR environment variable - cf https://metacpan.org/module/Test::Perl::Critic#SYNOPSIS

That doesn't "recommend" the use of TEST_AUTHOR, it's just using that variable as an example of skipping the tests on non-author situation.

Perl build tool authors have made a consensus around environment variable for such release engineering tests back in 2008: https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/oslo-consensus.md and the use of RELEASE_TESTING is more appropriate here. See also #10.

miyagawa avatar Jun 09 '13 23:06 miyagawa

Thanks, miyagawa for posting these links - good to see that there've been quite some thoughts on this topic. For my understanding, setting RELEASE_TESTING in the context of shipit's DistTest step seems to be the right thing to do - otherwise the author would have to manually set it whenever he prepares a new package for upload, while unsetting the variable whenever he installs foreign modules... Are you d'accord with setting it in ShipIt::ProjectType::Perl::MakeMaker::disttest? ShipIt::Step::DistTest would be another viable option...

mephinet avatar Jun 10 '13 08:06 mephinet