Greg Nisbet
Greg Nisbet

Reputation: 6994

Configure CPAN to Run Author Tests As Well

Is it possible to configure CPAN to run author tests as well if they are appropriate for my OS/Arch? I am more concerned about installing a package that is out of sync with its own test suite without realizing it than taking more time to install new packages.

Upvotes: 0

Views: 72

Answers (2)

oalders
oalders

Reputation: 5279

According to the Lancaster Consensus AUTHOR_TESTING is the env var that distribution authors should be using for this kind of testing. In practice, there are other var names out in the wild, but people should probably standardize on this one.

AUTHOR_TESTING=1 cpan Module::NAME

Upvotes: 1

ikegami
ikegami

Reputation: 385914

"Author tests" are usually run or skipped based on an env var, so it's just a question of setting that env var. For example, I use DEVEL_TESTS, so the following would run all of WWW-Kickstarter's tests, including the one that makes sure all references to the distro's version are consistent:

DEVEL_TESTS=1 cpan WWW::Kickstarter 

Upvotes: 2

Related Questions