about summary refs log tree commit homepage
path: root/t/xcpdb-reshard.t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-09-14 06:29:26 +0000
committerEric Wong <e@80x24.org>2020-09-14 21:29:56 +0000
commit23eab6127c62d0228a0cfcec78a267fe5e7011c7 (patch)
treeb0a0d8e3cfe2a279e81fd775bf85838b8c9dfd53 /t/xcpdb-reshard.t
parentee8cadb3a71ab4c951642a96ba123688244de720 (diff)
downloadpublic-inbox-23eab6127c62d0228a0cfcec78a267fe5e7011c7.tar.gz
We may need to test against development versions of Xapian,
which may rely on setting `XAPIAN_COMPACT=xapian-compact-1.5'.
Ensure it's possible to do that.

And add a missing check in t/xcpdb-reshard.t, too.
Diffstat (limited to 't/xcpdb-reshard.t')
-rw-r--r--t/xcpdb-reshard.t2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/xcpdb-reshard.t b/t/xcpdb-reshard.t
index c1af5d9a..ede736c1 100644
--- a/t/xcpdb-reshard.t
+++ b/t/xcpdb-reshard.t
@@ -45,7 +45,7 @@ my %nums = map {; "$_->{num}" => 1 } @$orig;
 for my $R (qw(2 4 1 3 3)) {
         delete $ibx->{search}; # release old handles
         my $cmd = [@xcpdb, "-R$R", $ibx->{inboxdir}];
-        push @$cmd, '--compact' if $R == 1;
+        push @$cmd, '--compact' if $R == 1 && have_xapian_compact;
         ok(run_script($cmd), "xcpdb -R$R");
         my @new_shards = grep(m!/\d+\z!, glob("$ibx->{inboxdir}/xap*/*"));
         is(scalar(@new_shards), $R, 'resharded to two shards');