aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/build_benches.sh
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-11-26 17:11:17 +0100
committerCyril SIX <cyril.six@kalray.eu>2019-11-26 17:11:17 +0100
commit6a3a2c90c52c60f2f9cc64dddb7b953a6b804f76 (patch)
treec2d635fe41ce7b8e00417f70a56f5cb0435b8b3d /test/monniaux/build_benches.sh
parentdef114623f2d03ea7838900b531f7b3beec5a7a0 (diff)
downloadcompcert-kvx-6a3a2c90c52c60f2f9cc64dddb7b953a6b804f76.tar.gz
compcert-kvx-6a3a2c90c52c60f2f9cc64dddb7b953a6b804f76.zip
build_benches.sh adapting to number of cores
Diffstat (limited to 'test/monniaux/build_benches.sh')
-rwxr-xr-xtest/monniaux/build_benches.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/monniaux/build_benches.sh b/test/monniaux/build_benches.sh
index a749779d..01abf55d 100755
--- a/test/monniaux/build_benches.sh
+++ b/test/monniaux/build_benches.sh
@@ -2,6 +2,7 @@
TMPFILE=/tmp/1513times.txt
+cores=$(grep -c ^processor /proc/cpuinfo)
source benches.sh
default="\e[39m"
@@ -13,9 +14,9 @@ rm -f $TMPFILE
for bench in $benches; do
echo -e "${magenta}Building $bench..${default}"
if [ "$1" == "" ]; then
- (cd $bench && make -s -j20 > /dev/null &> /dev/null) || { echo -e "${red}Build failed" && break; }
+ (cd $bench && make -s -j$cores > /dev/null &> /dev/null) || { echo -e "${red}Build failed" && break; }
else
- (cd $bench && make -j20) | grep -P "\d+: \d+\.\d+" >> $TMPFILE
+ (cd $bench && make -j$cores) | grep -P "\d+: \d+\.\d+" >> $TMPFILE
fi
done