X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=t%2Ftest.pl;h=d9fdaf495ea12898e3eb1519f0f3aa83462e6554;hb=9708fb4924239187cf919f78995e06c6fe2b5275;hp=d20f01da0a905f0e2420461728b403f6a0c15614;hpb=8317b7aa1407238c9fa8d609a1795b4ee20cb2dd;p=kivitendo-erp.git diff --git a/t/test.pl b/t/test.pl index d20f01da0..d9fdaf495 100755 --- a/t/test.pl +++ b/t/test.pl @@ -5,27 +5,37 @@ use strict; use Data::Dumper; use File::Find (); use Test::Harness qw(runtests execute_tests); +use Getopt::Long; BEGIN { - $ENV{HARNESS_OPTIONS} = 'j:c'; + $ENV{HARNESS_OPTIONS} = 'c'; unshift @INC, 'modules/override'; 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'); + File::Find::find(sub { push @files, $File::Find::name if (-f $_) && m/\.t$/ }, 't'); return @files; } 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()); }