Ovid wrote:
> I do something like the following to get this effect:
> 
>   #!/usr/bin/perl -w
>   use strict;
>   use Test::Harness;
>   use Getopt::Long;
>   use Pod::Usage;
> 
>   GetOptions(
>     'help|?'    => sub { pod2usage(-verbose => 2); exit },
>     'verbose!'  => \$Test::Harness::verbose,
>     'quiet'     => sub { $Test::Harness::verbose = 0 },
>     'include=s' => \my @include,
>     'exclude=s' => \my @exclude,
>     'shuffle'   => \my $shuffle_tests,
>     'fast'      => \$ENV{FAST_TESTS},
>   );
> 
> In this case, this is part of my driver script and I call it like:
> 
>   grind --fast
> 
> That runs through all of my tests, but the "FAST_TESTS" environment
> variable is available in the test programs that I run.

Oooooh, that 'grind' looks like a very handy command but I'm a bit
confused about how you use it. Is it just a handy general-purpose
command or do you use it specifically as part of "make test" in
your CPAN distributions? If you have used it in a CPAN module,
please let me know which one, so I can take a look.

I assume grind calls Test::Harness:runtests() shortly after accepting
these command-line options, running all "t/*.t" tests by default, and
using @include and @exclude to include/exclude tests. Is that right?
What is --shuffle and --fast used for? Can you please give some
examples of how you use it?

BTW, is there a web site that allows you to search CPAN source code?
For example, I might like to search all of CPAN for any distribution
that contains Test::Harness in any file in the t/ directory.

/-\


http://search.yahoo.com.au - Yahoo! Search
- Looking for more? Try the new Yahoo! Search

Reply via email to