7 use Test::Harness qw(runtests execute_tests);
11 $ENV{HARNESS_OPTIONS} = 'c';
12 unshift @INC, 'modules/override';
13 push @INC, 'modules/fallback';
16 my @exclude_for_fast = (
21 sub find_files_to_test {
23 File::Find::find(sub { push @files, $File::Find::name if (-f $_) && m/\.t$/ }, 't');
27 my (@tests_to_run, @tests_to_run_first);
30 'f|fast' => \ my $fast,
34 @tests_to_run = @ARGV;
37 @tests_to_run_first = qw(t/000setup_database.t);
38 my %exclude = map { ($_ => 1) } @tests_to_run_first, (@exclude_for_fast)x!!$fast;
39 @tests_to_run = grep { !$exclude{$_} } sort(find_files_to_test());
42 if (@tests_to_run_first) {
43 my ($total, $failed) = execute_tests(tests => \@tests_to_run_first);
44 exit(1) unless !$total->{bad} && (0 < $total->{max});
47 runtests(@tests_to_run);