From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 2A662205BD for ; Wed, 22 May 2019 02:14:04 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 4/5] t/search*: require DBI and DBD::SQLite, too Date: Wed, 22 May 2019 02:14:01 +0000 Message-Id: <20190522021402.24114-5-e@80x24.org> In-Reply-To: <20190522021402.24114-1-e@80x24.org> References: <20190522021402.24114-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: None of the Search::Xapian-dependent stuff works without DBI and DBD::SQLite. There are no plans to support Xapian w/o DBD::SQLite since SQLite is more common and less resource-intensive than Xapian. --- t/search-thr-index.t | 7 +++++-- t/search.t | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/t/search-thr-index.t b/t/search-thr-index.t index 848dc56..1872af8 100644 --- a/t/search-thr-index.t +++ b/t/search-thr-index.t @@ -7,8 +7,11 @@ use Test::More; use File::Temp qw/tempdir/; use PublicInbox::MID qw(mids); use Email::MIME; -eval { require Search::Xapian }; -plan skip_all => "Search::Xapian missing for search" if $@; +my @mods = qw(DBI DBD::SQLite Search::Xapian); +foreach my $mod (@mods) { + eval "require $mod"; + plan skip_all => "missing $mod for $0" if $@; +} require PublicInbox::SearchIdx; my $tmpdir = tempdir('pi-search-thr-index.XXXXXX', TMPDIR => 1, CLEANUP => 1); my $git_dir = "$tmpdir/a.git"; diff --git a/t/search.t b/t/search.t index a9d0c92..c063620 100644 --- a/t/search.t +++ b/t/search.t @@ -3,8 +3,11 @@ use strict; use warnings; use Test::More; -eval { require Search::Xapian }; -plan skip_all => "Search::Xapian missing for search" if $@; +my @mods = qw(DBI DBD::SQLite Search::Xapian); +foreach my $mod (@mods) { + eval "require $mod"; + plan skip_all => "missing $mod for $0" if $@; +}; require PublicInbox::SearchIdx; use File::Temp qw/tempdir/; use Email::MIME; -- EW