From a5a2efce1e0ae6b781e1a1f5dbabcfc1a8842199 Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Tue, 19 Apr 2011 11:58:55 +0100 Subject: [PATCH] t/porting/cmp_version.t: add version skip facility Allow it to skip failing for particular versions of particular modules --- t/porting/cmp_version.t | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/t/porting/cmp_version.t b/t/porting/cmp_version.t index 7588f6b4f5..0f923fd689 100644 --- a/t/porting/cmp_version.t +++ b/t/porting/cmp_version.t @@ -63,6 +63,14 @@ my %skip; 'lib/Exporter/Heavy.pm', 'win32/FindExt.pm', } = (); + +# Files to skip just for particular version(s), +# usually due to some # mix-up + +my %skip_versions = ( + # 'some/sample/file.pm' => [ '1.23', '1.24' ], +); + my $skip_dirs = qr{^(?:t/lib|cpan)}; my @all_diffs = `git --no-pager diff --name-only $tag_to_compare`; @@ -107,6 +115,8 @@ foreach my $pm_file (@module_diffs) { next if ( ! defined $pm_version || ! defined $orig_pm_version ); next if ( $pm_version eq 'undef' || $orig_pm_version eq 'undef' ); # sigh next if $pm_version ne $orig_pm_version; + next if exists $skip_versions{$pm_file} + and grep $pm_version eq $_, @{$skip_versions{$pm_file}}; push @diff => $pm_file unless $pm_eq; push @diff => $xs_file unless $xs_eq; } -- 2.34.1