From: Eric Wong Date: Tue, 9 Feb 2021 08:09:28 +0000 (-0100) Subject: test_common: disable fsync on the CLI where possible X-Git-Tag: v1.7.0~1150 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=52ca935f857b8d7c7daf9837d9146886f825f2e8;p=public-inbox.git 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. --- 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;