]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
rename t/run.perl to xt/check-run
authorEric Wong <e@80x24.org>
Mon, 18 Sep 2023 10:15:12 +0000 (10:15 +0000)
committerEric Wong <e@80x24.org>
Wed, 20 Sep 2023 19:14:22 +0000 (19:14 +0000)
This allows us to get rid of some duplication in our Makefile

MANIFEST
Makefile.PL
t/nntpd.t
xt/check-run.t [moved from t/run.perl with 98% similarity]

index 2fe5dd173b8e10999954f28e815db3dec77fa605..7dba38366d0dc3cf4b2705d2777d907772c95ee4 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -577,7 +577,6 @@ t/reindex-time-range.t
 t/rename_noreplace.t
 t/replace.t
 t/reply.t
-t/run.perl
 t/search-amsg.eml
 t/search-thr-index.t
 t/search.t
@@ -621,6 +620,7 @@ t/xap_helper.t
 t/xcpdb-reshard.t
 version-gen.perl
 xt/check-debris.t
+xt/check-run.t
 xt/cmp-msgstr.t
 xt/create-many-inboxes.t
 xt/eml_check_limits.t
index 97e00395e55bf6d3146cf7919bcb5c9a73cbda9e..9dc18b5cdbcd5c52058fd9b2de429d38cedb1e3e 100644 (file)
@@ -235,13 +235,16 @@ check-each :: pure_all
        \$(EATMYDATA) \$(PROVE) --state=save -bvw -j\$(N)
        -@\$(check_manifest)
 
-# this relies "--state=save" in check-each for best performance
-check-run :: pure_all check-man
-       \$(EATMYDATA) \$(PROVE) -bvw t/run.perl :: -j\$(N)
-       -@\$(check_manifest)
+# check-run relies "--state=save" in check-each for best performance
+check-run :: check-man
+
+# n.b. while `-' isn't specified as an allowed make(1posix) macro name,
+# GNU and *BSD both allow it.
+check-run_T_ARGS = -j\$(N)
 
-check-debris :: pure_all
-       PERL5LIB="\$\$PWD"/blib/lib \$(PROVE) -bvw xt/\$@.t
+check-debris check-run :: pure_all
+       \$(EATMYDATA) \$(PROVE) -bvw xt/\$@.t :: \$(\$\@_T_ARGS)
+       -@\$(check_manifest)
 
 check :: check-each
 
index 9a7efd86d7f2b099732be5d544802a42ee45a302..ffe0fd8c1e73639afcd82155bc5191ba44d65f0f 100644 (file)
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -330,7 +330,7 @@ Date: Fri, 02 Oct 1993 00:00:00 +0000
        SKIP: {
                if ($INC{'Search/Xapian.pm'} || $INC{'Xapian.pm'} &&
                                ($ENV{TEST_RUN_MODE} // 2)) {
-                       skip 'Xapian.pm pre-loaded (by t/run.perl?)', 1;
+                       skip 'Xapian.pm pre-loaded (by xt/check-run.t?)', 1;
                }
                $lsof or skip 'lsof missing', 1;
                my @of = xqx([$lsof, '-p', $td->{pid}], undef, $noerr);
similarity index 98%
rename from t/run.perl
rename to xt/check-run.t
index 9c8129d55d6393f9f4c4ab15572e50ca5cec05f5..6eefcb7d8f200f19d290db3895c92ca47491f560 100755 (executable)
@@ -8,8 +8,8 @@
 #
 # *.t files run by this should not rely on global state.
 #
-# Usage: $PERL -I lib -w t/run.perl -j4
-# Or via prove(1): prove -lvw t/run.perl :: -j4
+# Usage: $PERL -I lib -w xt/check-run.t -j4
+# Or via prove(1): prove -lvw xt/check-run.t :: -j4
 use v5.12;
 use IO::Handle; # ->autoflush
 use PublicInbox::TestCommon;