Actually what you can do is have your regression test report "skipped
test on this platform".  This is done by having your test script
output "1..0" instead of "1..N" where N is the actual number of tests
it performs.

In other words, the test script can test if the prerequisites are in
place, and if so, then output "1..N"; otherwise, output "1..0" and
exit.  This way it should pass the automated tests and CPAN.pm but
during an actual manual install, you can do the actual tests.

To do the actual tests, you can ask the user questions the way
"libnet" does, or make the user fill in certain environment variables
the way DBD::Oracle does.

--Bill.

[EMAIL PROTECTED] (John Gorman) writes:
> Hi Sean
> 
> Since no one answered I will answer myself.  It turns out
> that if we let the automated test fail for any reason,
> the CPAN.pm method of installation will crash and burn:
> 
> # perl -MCPAN -e shell
> cpan> install DBIx::BabelKit
> ... Download, test fails, install fails.
> 
> This means that test.pl should contain something
> simple like this which succeeds if the required
> modules are present and if our module compiles:
> 
> #!/usr/bin/env perl
> 
> use Test;
> BEGIN { plan tests => 1 };
> use DBI;
> use DBIx::BabelKit;
> ok(1); # If we made it this far, we're ok.
> 
> I moved my regression test script to:
> 
> $ ./regression.test
> 
> Cheers, John
> 
> John Gorman
> [EMAIL PROTECTED]
> Senior Database Architect
> 

-- 
William R Ward            [EMAIL PROTECTED]          http://www.wards.net/~bill/
-----------------------------------------------------------------------------
"A foolish consistency is the hobgoblin of little minds, adored by
 little statesmen and philosophers and divines."        - Emerson

Reply via email to