Skip to content

Commit 3e66a2c

Browse files
author
Daniel Abercrombie
committed
Add some resilience to comparison script.
1 parent 3a789e6 commit 3e66a2c

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

RelVal/scripts/comparepanda.pl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,22 @@
1919
my ($end) = $_ =~ m|(/[^/]+/[^/]+$suff)$|;
2020
my ($match) = grep { $_ =~ m/${end}$/ } @snd_files;
2121

22-
if (compare($_, $match)) {
23-
say "$end is different!";
24-
`diff $_ $match`;
22+
if ($match) {
23+
if (compare($_, $match)) {
24+
say "$end is different!";
25+
`diff $_ $match`;
26+
$bad_matches += 1;
27+
}
28+
}
29+
else {
30+
say "No file $snd_dir$end";
2531
$bad_matches += 1;
2632
}
2733
}
2834

2935
if ($bad_matches) {
30-
die "$bad_matches files don't match...";
36+
say "$bad_matches files don't match...";
37+
exit 1;
3138
}
3239

3340
say "All files match!";

0 commit comments

Comments
 (0)