CPAN::YACSmoke::FAQ - YACSmoke Frequently Asked Questions
YACSmoke uses CPANPLUS::Backend to download, extract, and test packages and send out the reports. The advantage is that we don't have to re-write duplicate code. The disadvantage is that some of the bugs in CPANPLUS will affect CPAN::YACSmoke as well.
This is a CPANPLUS issue, not a YACSmoke issue. To change it, you need to change the extractdir and fetchdir locations in CPANPLUS. Open the shell and run the following commands:
extractdir
fetchdir
s conf extractdir /some/extract/dir s conf fetchdir /some/fetch/dir s save
Alternatively, you can update those settings in the cpansmoke.ini file, but that will only affect test reports sent out using YACSmoke, and not those from the CPANPLUS shell.
Your module should check if the AUTOMATED_TESTING envornment variable is set:
if ($ENV{AUTOMATED_TESTING}) { ... }
There are several solutions:
Use an environment variable or cross-platform method of locating a configuration file that has the information you need.
Skip all tests that need this input if $ENV{AUTOMATED_TESTING} is set, and live with the fact that automated smoke tests for your module won't be thorough.
$ENV{AUTOMATED_TESTING}
You can use a package such as Test::Expect to test automated interactive sessions. (Note that Test::Expect may not run on every platform, so you should skip the tests if it is not installed.)
For Windows programs which use a graphical interface, there's also Win32::GuiTest.
Include sample data to test against if no user data is available.
See perlport - Writing portable Perl.
YACSmoke relies on CPANPLUS to determine that. Currently (CPANPLUS version 0.054) looks at the module name: if it begins with a platform name such as "Win32" or "Solaris", then it issues an "NA" (Not Applicable) report.
We are looking into ways to allow tests to issue NA results rather than relying on package names.
One suggestion from the Perl module-authors list http://www.nntp.perl.org/group/perl.module-authors/3600 is in the Makefile.PL and Build.PL to die with a reason:
die "NA: $reason";
Note that current versions of CPANPLUS and YACSmoke do not yet recognize this.
CPANPLUS
CPAN
To install CPAN::YACSmoke, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CPAN::YACSmoke
CPAN shell
perl -MCPAN -e shell install CPAN::YACSmoke
For more information on module installation, please visit the detailed CPAN module installation guide.