detect_nproc is in the IPC module, now; and we can safely
disable fsync when creating test data.
And "modernize" up to 5.10.1 while we're at it.
The use fsync was causing this to run for hours instead
of minutes since I forgot to use eatmydata.
# Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
use strict;
# Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
use strict;
use PublicInbox::TestCommon;
use PublicInbox::Eml;
use PublicInbox::TestCommon;
use PublicInbox::Eml;
use File::Path qw(mkpath);
use IO::Handle (); # autoflush
use POSIX qw(_exit);
use File::Path qw(mkpath);
use IO::Handle (); # autoflush
use POSIX qw(_exit);
require_mods(qw(DBD::SQLite Search::Xapian));
use_ok 'PublicInbox::V2Writable';
my $nr_inbox = $ENV{NR_INBOX} // 10;
require_mods(qw(DBD::SQLite Search::Xapian));
use_ok 'PublicInbox::V2Writable';
my $nr_inbox = $ENV{NR_INBOX} // 10;
-my $nproc = $ENV{NPROC} || PublicInbox::V2Writable::detect_nproc() || 2;
+my $nproc = $ENV{NPROC} || PublicInbox::IPC::detect_nproc() || 2;
my $indexlevel = $ENV{TEST_INDEXLEVEL} // 'basic';
diag "NR_INBOX=$nr_inbox NPROC=$nproc TEST_INDEXLEVEL=$indexlevel";
diag "TEST_MANY_ROOT=$many_root";
my $indexlevel = $ENV{TEST_INDEXLEVEL} // 'basic';
diag "NR_INBOX=$nr_inbox NPROC=$nproc TEST_INDEXLEVEL=$indexlevel";
diag "TEST_MANY_ROOT=$many_root";
address => [ "test-$i\@example.com" ],
url => [ "//example.com/test-$i" ],
version => 2,
address => [ "test-$i\@example.com" ],
url => [ "//example.com/test-$i" ],
version => 2,
});
$ibx->{indexlevel} = $indexlevel if $level_cfg ne '';
my $entry = <<EOF;
});
$ibx->{indexlevel} = $indexlevel if $level_cfg ne '';
my $entry = <<EOF;