summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-04-19 11:58:55 +0100
committerDavid Mitchell <davem@iabyn.com>2011-04-19 11:58:55 +0100
commita5a2efce1e0ae6b781e1a1f5dbabcfc1a8842199 (patch)
treef7323504ed1bd127142ae691433f8c9982abacb4
parentc8bbc38ea608bad1c5a648072dc29e1c71d86862 (diff)
downloadperl-a5a2efce1e0ae6b781e1a1f5dbabcfc1a8842199.tar.gz
t/porting/cmp_version.t: add version skip facility
Allow it to skip failing for particular versions of particular modules
-rw-r--r--t/porting/cmp_version.t10
1 files changed, 10 insertions, 0 deletions
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;
}