summaryrefslogtreecommitdiff
path: root/Porting
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-07-05 14:09:28 +0200
committerNicholas Clark <nick@ccl4.org>2011-07-06 10:52:42 +0200
commitf008f53b0874b02cab7afb0241a91795650faa93 (patch)
tree098a0c2a50478f653c9e3250e49dfd22b07b3f61 /Porting
parent8304a6c43fb2482cbeadcb208b8f2e87c4a94726 (diff)
downloadperl-f008f53b0874b02cab7afb0241a91795650faa93.tar.gz
In cmp_version.t, show in the TAP when we are skipping a particular version.
The facility to skip specific versions of modules was added in a5a2efce1e0ae6b7. However, it gave no indication when such an exception caused a skip, because it generated identical TAP output to the normal pass case. Instead, we now show the diffs (as for the "not ok" TAP output), but generate TAP "SKIP" for the pass. This makes it clear what is happening.
Diffstat (limited to 'Porting')
-rwxr-xr-xPorting/cmpVERSION.pl15
1 files changed, 7 insertions, 8 deletions
diff --git a/Porting/cmpVERSION.pl b/Porting/cmpVERSION.pl
index 92cfec9e36..5dadcf5639 100755
--- a/Porting/cmpVERSION.pl
+++ b/Porting/cmpVERSION.pl
@@ -77,14 +77,10 @@ my %skip;
# Files to skip just for particular version(s),
# usually due to some # mix-up
-my %skip_versions;
-if ($tap) {
- %skip_versions
- = (
+my %skip_versions = (
# 'some/sample/file.pm' => [ '1.23', '1.24' ],
'dist/threads/lib/threads.pm' => [ '1.83' ],
);
-}
my $skip_dirs = qr|^t/lib|;
@@ -154,8 +150,6 @@ foreach my $pm_file (sort keys %module_diffs) {
if ((!defined $pm_version || !defined $orig_pm_version)
|| ($pm_version eq 'undef' || $orig_pm_version eq 'undef') # sigh
|| ($pm_version ne $orig_pm_version) # good
- || (exists $skip_versions{$pm_file}
- and grep $pm_version eq $_, @{$skip_versions{$pm_file}})
) {
printf "ok %d - %s\n", ++$count, $pm_file if $tap;
} else {
@@ -163,7 +157,12 @@ foreach my $pm_file (sort keys %module_diffs) {
foreach (sort @{$module_diffs{$pm_file}}) {
print "# $_" for `$diff_cmd '$_'`;
}
- printf "not ok %d - %s\n", ++$count, $pm_file;
+ if (exists $skip_versions{$pm_file}
+ and grep $pm_version eq $_, @{$skip_versions{$pm_file}}) {
+ printf "ok %d - SKIP $pm_file version $pm_version\n", ++$count;
+ } else {
+ printf "not ok %d - %s\n", ++$count, $pm_file;
+ }
} else {
push @diff, @{$module_diffs{$pm_file}};
print "$pm_file\n";