From 7321c78ebdcaa7ce5f0f8383e07429827da0b718 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 18 Dec 2019 03:36:45 +0000 Subject: t/run.perl: to avoid repeated process spawning for *.t 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. --- t/nntpd.t | 3 +++ 1 file changed, 3 insertions(+) (limited to 't/nntpd.t') 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; -- cgit v1.2.3-24-ge0c7