use Data::Dumper;
use File::Find ();
use Test::Harness qw(runtests execute_tests);
+use Getopt::Long;
BEGIN {
$ENV{HARNESS_OPTIONS} = 'c';
push @INC, 'modules/fallback';
}
+my @exclude_for_fast = (
+ 't/001compile.t',
+ 't/003safesys.t',
+);
+
sub find_files_to_test {
my @files;
File::Find::find(sub { push @files, $File::Find::name if (-f $_) && m/\.t$/ }, 't');
my (@tests_to_run, @tests_to_run_first);
+GetOptions(
+ 'f|fast' => \ my $fast,
+);
+
if (@ARGV) {
@tests_to_run = @ARGV;
} else {
@tests_to_run_first = qw(t/000setup_database.t);
- my %exclude = map { ($_ => 1) } @tests_to_run_first;
+ my %exclude = map { ($_ => 1) } @tests_to_run_first, (@exclude_for_fast)x!!$fast;
@tests_to_run = grep { !$exclude{$_} } sort(find_files_to_test());
}