From 742f62b93b94208e8cbb306706b1a277ea000d64 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 8 Aug 2014 13:12:24 +0200 Subject: [PATCH] test.pl: --fast switch, skippt 001compile und 003safesys --- t/test.pl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/t/test.pl b/t/test.pl index fac0e412a..d9fdaf495 100755 --- a/t/test.pl +++ b/t/test.pl @@ -5,6 +5,7 @@ use strict; use Data::Dumper; use File::Find (); use Test::Harness qw(runtests execute_tests); +use Getopt::Long; BEGIN { $ENV{HARNESS_OPTIONS} = 'c'; @@ -12,6 +13,11 @@ BEGIN { 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'); @@ -20,12 +26,16 @@ sub find_files_to_test { 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()); } -- 2.20.1