From c1d0a4876d4ffc816b6616ad08f1cb1b3186557f Mon Sep 17 00:00:00 2001 From: Arx Cruz Date: Wed, 26 Mar 2014 14:43:08 -0300 Subject: [PATCH] Altering the > to -gt to check number of processors Using > to check if a variable is greater then another doesn't seems to work among distros. Using -gt instead of > ensure that will work in different distros that may implement different bash versions Change-Id: Ie270ad8aa512807fbce3052018e9ce0db7c238b4 --- devstack-vm-gate-wrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index c7cbe831..e4b6f145 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -174,7 +174,7 @@ export DEVSTACK_GATE_CONFIGDRIVE=${DEVSTACK_GATE_CONFIGDRIVE:-1} # Set the number of threads to run tempest with DEFAULT_CONCURRENCY=$(nproc) -if [ ${DEFAULT_CONCURRENCY} > 3 ] ; then +if [ ${DEFAULT_CONCURRENCY} -gt 3 ] ; then DEFAULT_CONCURRENCY=$[${DEFAULT_CONCURRENCY} / 2] fi export TEMPEST_CONCURRENCY=${TEMPEST_CONCURRENCY:-${DEFAULT_CONCURRENCY}}