]> Sergey Matveev's repositories - public-inbox.git/blobdiff - Makefile.PL
xcpdb: support --no-fsync from CLI
[public-inbox.git] / Makefile.PL
index 30b8adda2f0166126a543ba0b9cd42367a155e49..831649f967f27609e79e46606707e02a10ae8ff0 100644 (file)
@@ -138,10 +138,6 @@ WriteMakefile(
                # Plack is needed for public-inbox-httpd and PublicInbox::WWW
                # 'Plack' => 0,
 
-               # Filesys::Notify::Simple is pulled in by Plack, but also
-               # needed by public-inbox-watch (for now)
-               # 'Filesys::Notify::Simple' => 0,
-
                # TODO: this should really be made optional...
                'URI::Escape' => 0,
 
@@ -160,12 +156,14 @@ WriteMakefile(
 );
 
 sub MY::postamble {
-  <<EOF;
+       my $N = (`{ getconf _NPROCESSORS_ONLN || nproc; } 2>/dev/null` || 1);
+       $N += 1; # account for sleeps in some tests (and makes an IV)
+       <<EOF;
 PROVE = prove
 # support using eatmydata to speed up tests (apt-get install eatmydata):
 # https://www.flamingspork.com/projects/libeatmydata/
 EATMYDATA =
-N = \$\$(( \$\$(nproc 2>/dev/null || gnproc 2>/dev/null || echo 2) + 1 ))
+N = $N
 -include config.mak
 $VARS
 -include Documentation/include.mk
@@ -180,18 +178,22 @@ syntax:: \$(my_syntax)
 changed = \$(shell git ls-files -m)
 dsyn :: \$(addsuffix .syntax, \$(filter \$(changed), \$(syn_files)))
 
-check-manifest :: MANIFEST
-       if test -e .git && git ls-files >\$?.gen 2>&1; then \\
-               diff -u \$? \$?.gen; fi
+check_manifest := if test -e .git && git ls-files >MANIFEST.gen 2>&1; then \\
+               diff -u MANIFEST MANIFEST.gen; fi
+
+check-manifest : MANIFEST
+       \$(check_manifest)
 
 # the traditional way running per-*.t processes:
-check-each :: pure_all check-manifest
+check-each :: pure_all
        \$(EATMYDATA) \$(PROVE) --state=save -bvw -j\$(N)
+       -@\$(check_manifest)
 
 # lightly-tested way to run tests, relies "--state=save" in check-each
 # for best performance
-check-run :: pure_all check-manifest
+check-run :: pure_all
        \$(EATMYDATA) \$(PROVE) -bvw t/run.perl :: -j\$(N)
+       -@\$(check_manifest)
 
 check :: check-each