]> Sergey Matveev's repositories - public-inbox.git/commitdiff
test_common: disable fsync on the CLI where possible
authorEric Wong <e@80x24.org>
Tue, 9 Feb 2021 08:09:28 +0000 (07:09 -0100)
committerEric Wong <e@80x24.org>
Wed, 10 Feb 2021 06:59:02 +0000 (06:59 +0000)
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

index 2f4ca62255716cd7a0768bb7d44eb894cfe5ff18..ec9191b6c975aac47e5686de8be05f79169c81b1 100644 (file)
@@ -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;