[Rt-commit] rt branch, 5.0/use-all-cores-for-parallel-tests, created. rt-5.0.0-2-g18bbbe1429

Dianne Skoll dianne at bestpractical.com
Wed Jul 29 14:45:41 EDT 2020


The branch, 5.0/use-all-cores-for-parallel-tests has been created
        at  18bbbe1429f74c81d1c69619fd20260483aed424 (commit)

- Log -----------------------------------------------------------------
commit 18bbbe1429f74c81d1c69619fd20260483aed424
Author: Dianne Skoll <dianne at bestpractical.com>
Date:   Wed Jul 29 14:39:21 2020 -0400

    Make RT_TEST_PARALLEL default to the number of cores on the test machine.
    
    We use the command "nproc" to get the number of cores.  If this command
    fails (it might not exist on non-Linux systems) we revert to the old
    default of 5.

diff --git a/Makefile.in b/Makefile.in
index 48d1721d99..fe414e85f3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -232,7 +232,10 @@ DB_RT_PASS		=	@DB_RT_PASS@
 TEST_FILES = t/*.t t/*/*.t t/*/*/*.t
 TEST_VERBOSE = 0
 
-RT_TEST_PARALLEL_NUM ?= 5
+# By default, use all the cores we have for parallel tests.
+# If the nproc command is not implemented on our system,
+# default to 5.
+RT_TEST_PARALLEL_NUM ?= $(shell nproc 2>/dev/null || 5)
 
 
 ####################################################################

-----------------------------------------------------------------------


More information about the rt-commit mailing list