]> Sergey Matveev's repositories - public-inbox.git/commitdiff
build: support eatmydata in "make check" target by default
authorEric Wong <e@80x24.org>
Sat, 14 May 2016 01:16:15 +0000 (01:16 +0000)
committerEric Wong <e@80x24.org>
Sat, 14 May 2016 01:17:17 +0000 (01:17 +0000)
This should help poor developers who still use rotating disks on
cheap netbooks.

.gitignore
Makefile.PL

index dc18378c238f4818a7f9e90923b1499743893107..18d002106ca35232e46f4b4c4659a15093339986 100644 (file)
@@ -1,3 +1,4 @@
+/config.mak
 /Makefile.old
 /pm_to_blib
 /MYMETA.*
index 1948848f3d2d54d5b63e30cc355ae9ac7c7d6a00..448c79c36b37b6f2d6abd86d4b20b202d98e8c9f 100644 (file)
@@ -36,6 +36,10 @@ WriteMakefile(
 
 sub MY::postamble {
   <<EOF;
+# support using eatmydata to speed up tests (apt-get install eatmydata):
+# https://www.flamingspork.com/projects/libeatmydata/
+EATMYDATA =
+-include config.mak
 -include Documentation/include.mk
 my_syntax := \$(addsuffix .syntax, $PM_FILES \$(EXE_FILES))
 
@@ -47,7 +51,7 @@ N := \$(shell echo \$\$(( \$\$(nproc 2>/dev/null || echo 2) + 1)))
 syntax:: \$(my_syntax)
 
 check:: pure_all
-       prove -lv -j\$(N)
+       \$(EATMYDATA) prove -lv -j\$(N)
 
 EOF
 }