about summary refs log tree commit homepage
path: root/t/nntpd.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-12-18 03:36:45 +0000
committerEric Wong <e@80x24.org>2019-12-19 04:07:50 +0000
commit7321c78ebdcaa7ce5f0f8383e07429827da0b718 (patch)
tree1877bacf3b43494f3d8a10e059fe3309953c6405 /t/nntpd.t
parent3c313f9034aac96182e2efdc2f92c40803626f32 (diff)
downloadpublic-inbox-7321c78ebdcaa7ce5f0f8383e07429827da0b718.tar.gz
Spawning a new Perl interpreter for every test case
means Perl has to reparse and recompile every single file
it needs, costing us performance and development time.

Now that we've modified our code to avoid global state,
we can preload everything we need.

The new "check-run" test target is now 20-30% faster
than the original "check" target.
Diffstat (limited to 't/nntpd.t')
-rw-r--r--t/nntpd.t3
1 files changed, 3 insertions, 0 deletions
diff --git a/t/nntpd.t b/t/nntpd.t
index 30f3fb9c..c3712b67 100644
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -302,6 +302,9 @@ Date: Fri, 02 Oct 1993 00:00:00 +0000
                 is($? >> 8, 0, 'no errors');
         }
         SKIP: {
+                if ($INC{'Search/Xapian.pm'} && ($ENV{TEST_RUN_MODE}//1)) {
+                        skip 'Search/Xapian.pm pre-loaded (by t/run.perl?)', 1;
+                }
                 my @of = `lsof -p $td->{pid} 2>/dev/null`;
                 skip('lsof broken', 1) if (!scalar(@of) || $?);
                 my @xap = grep m!Search/Xapian!, @of;