[PATCH Search::Xapian] Makefile.PL: fix automated testing false negative
Alyssa Ross
hi at alyssa.is
Sun Sep 15 18:29:02 BST 2019
In the case of Search::Xapian 1.2.x and xapian-core 1.4.y, $msg is
deliberately unset because the two versions should be
compatible. Since this is intended to be an escape from this
conditional, it should be respected by the AUTOMATED_TESTING check, so
automated testing with compatible libraries doesn't nevertheless
result in no Makefile.
---
Makefile.PL | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.PL b/Makefile.PL
index 7aa3583..0efadc4 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -205,23 +205,23 @@ if ($xver !~ /^\Q$BASEVERSION\E(?:_(?:svn|git)[0-9]+)?$/) {
my $msg;
if ($no_chance) {
$msg = "Xapian version $xver is incompatible with Search::Xapian $VERSION\n";
} elsif ($BASEVERSION =~ /^1\.2\./ && $xver =~ /^1\.4\./) {
# Search::Xapian 1.2.x and xapian-core 1.4.y should work together
# (for x >= 24).
} else {
# We try to keep working with Xapian 1.5.x and up but no promises.
$msg = "Xapian version $xver may be incompatible with Search::Xapian $VERSION\n";
}
- if ($ENV{AUTOMATED_TESTING}) {
+ if ($ENV{AUTOMATED_TESTING} && defined $msg) {
# Don't let automated testers continue, as we don't want bogus failure
# reports due to builds with incompatible versions.
print $msg;
# Remove Makefile since "exit status 0 without generating Makefile"
# is taken to indicate "can't build because of missing dependencies"
# by CPAN test building scripts.
unlink "Makefile";
exit 0;
}
if ($no_chance) {
unlink "Makefile";
--
2.22.1
More information about the Xapian-discuss
mailing list