summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--validate10
1 files changed, 7 insertions, 3 deletions
diff --git a/validate b/validate
index 741daacecb..01d6a829e6 100644
--- a/validate
+++ b/validate
@@ -45,10 +45,14 @@ do
shift
done
-if [ "$CPUS" = "" ]; then
- threads=2
+if [ "$THREADS" = "" ]; then
+ if [ "$CPUS" = "" ]; then
+ threads=2
+ else
+ threads=$(($CPUS + 1)) # `expr $CPUS + 1`
+ fi
else
- threads=$(($CPUS + 1)) # `expr $CPUS + 1`
+ threads="$THREADS"
fi
if [ $testsuite_only -eq 0 ]; then