about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-09-18 10:15:12 +0000
committerEric Wong <e@80x24.org>2023-09-20 19:14:22 +0000
commiteb4ed924e9f8075ed134fbd590d390e208f4120f (patch)
tree54774885d0fb85e37110638726a3ddcbe345ad37
parent2a6063fbc45803150596be0d615e8618f7126b21 (diff)
downloadpublic-inbox-eb4ed924e9f8075ed134fbd590d390e208f4120f.tar.gz
This allows us to get rid of some duplication in our Makefile
-rw-r--r--MANIFEST2
-rw-r--r--Makefile.PL15
-rw-r--r--t/nntpd.t2
-rwxr-xr-xxt/check-run.t (renamed from t/run.perl)4
4 files changed, 13 insertions, 10 deletions
diff --git a/MANIFEST b/MANIFEST
index 2fe5dd17..7dba3836 100644
--- 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
diff --git a/Makefile.PL b/Makefile.PL
index 97e00395..9dc18b5c 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -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
 
diff --git a/t/nntpd.t b/t/nntpd.t
index 9a7efd86..ffe0fd8c 100644
--- 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);
diff --git a/t/run.perl b/xt/check-run.t
index 9c8129d5..6eefcb7d 100755
--- a/t/run.perl
+++ b/xt/check-run.t
@@ -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;