summaryrefslogtreecommitdiff
path: root/validate
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2010-03-21 11:28:35 +0000
committerIan Lynagh <igloo@earth.li>2010-03-21 11:28:35 +0000
commit15f7bc388dc47147bfcbb07f43afb70788369d4e (patch)
tree903d35505024769d66d760a8948de33d7c5e1194 /validate
parentc9959e41ee1d72aa0ca28d51580f1ad3c06f0e8b (diff)
downloadhaskell-15f7bc388dc47147bfcbb07f43afb70788369d4e.tar.gz
Allow specifying $threads directly when validating
Diffstat (limited to 'validate')
-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