From 577eb6224f3da0ff15f915df0d1a7bfffebc0ee0 Mon Sep 17 00:00:00 2001 From: 3djc Date: Fri, 12 Oct 2018 07:31:34 +0200 Subject: [PATCH] Allow commit-tests to be run much faster on dev PC (does not affect adversely Travis) --- tools/commit-tests.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/commit-tests.sh b/tools/commit-tests.sh index 223468e4b..70d54f240 100755 --- a/tools/commit-tests.sh +++ b/tools/commit-tests.sh @@ -4,8 +4,9 @@ set -e set -x -# Allow variable core usage, default uses two cores, to set 8 cores for example : commit-tests.sh -j8 -: ${CORES:=2} +# Allow variable core usage, default uses all cpu cores, to set 8 cores for example : commit-tests.sh -j8 +num_cpus=`grep 'physical id' /proc/cpuinfo | sort -u | wc -l` +: ${CORES:=$num_cpus} # Default build treats warnings as errors, set -Wno-error to override, e.g.: commit-tests.sh -Wno-error : ${WERROR:=1} # A board name to build for, or ALL