From 52ca935f857b8d7c7daf9837d9146886f825f2e8 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 9 Feb 2021 07:09:28 -0100 Subject: test_common: disable fsync on the CLI where possible This makes tests faster for users on slow TMPDIR (or not using eatmydata) and forces coverage on a non-default switch. Unfortunately, this doesn't yet cover InboxWritable usage. --- lib/PublicInbox/TestCommon.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/PublicInbox') diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm index 2f4ca622..ec9191b6 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -269,6 +269,9 @@ sub run_script ($;$$) { die "unable to deal with $ref $redir"; } } + if ($key =~ /-(index|convert|extindex|convert|xcpdb)\z/) { + unshift @argv, '--no-fsync'; + } if ($run_mode == 0) { # spawn an independent new process, like real-world use cases: require PublicInbox::Spawn; -- cgit v1.2.3-24-ge0c7