tests: new convenience target 'check-parallel'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 23 May 2013 22:44:59 +0000 (00:44 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 23 May 2013 22:45:18 +0000 (00:45 +0200)
To force the test scripts to invoke make in parallel mode.  This should
enhance coverage of use cases (make concurrency) that are becoming more
and more important with today multicore fast machines.

* Makefile.am (check-parallel): New .PHONY target.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Makefile.am

index 602d8ee775ea96bfa8c5cdaca9f3096eae096b98..15b87c94cf5b1ff8f7a4fc72102ff3b6f25b2b44 100644 (file)
@@ -524,6 +524,12 @@ check-no-trailing-backslash-in-recipes:
          CONFIG_SHELL='$(abs_top_builddir)/t/ax/shell-no-trail-bslash'
 .PHONY: check-no-trailing-backslash-in-recipes
 
+# Automake-generated Makefiles should work when run with parallel make.
+check-parallel:
+       $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) check \
+         AM_TESTSUITE_MAKE="$${AM_TESTSUITE_MAKE-$${MAKE-make}} -j4"
+.PHONY: check-parallel
+
 ## Checking the list of tests.
 test_subdirs = t t/pm contrib/t
 include $(srcdir)/t/CheckListOfTests.am