Don't use $ on variables inside (())

This commit is contained in:
Kamil Śliwak 2020-12-11 20:01:09 +01:00
parent 2784135c37
commit a05f3a608d
2 changed files with 9 additions and 9 deletions

View File

@ -32,18 +32,18 @@ EVM_VALUES=(homestead byzantium constantinople petersburg istanbul)
OPTIMIZE_VALUES=(0 1)
STEPS=$(( 2 + ${#EVM_VALUES[@]} * ${#OPTIMIZE_VALUES[@]} ))
if (( $CIRCLE_NODE_TOTAL )) && (( $CIRCLE_NODE_TOTAL > 1 ))
if (( CIRCLE_NODE_TOTAL )) && (( CIRCLE_NODE_TOTAL > 1 ))
then
# Run step 1 as the only step on the first executor
# and evenly distribute the other steps among
# the other executors.
# The first step takes much longer than the other steps.
if (( $CIRCLE_NODE_INDEX == 0 ))
if (( CIRCLE_NODE_INDEX == 0 ))
then
RUN_STEPS="1"
else
export CIRCLE_NODE_INDEX=$(($CIRCLE_NODE_INDEX - 1))
export CIRCLE_NODE_TOTAL=$(($CIRCLE_NODE_TOTAL - 1))
export CIRCLE_NODE_INDEX=$((CIRCLE_NODE_INDEX - 1))
export CIRCLE_NODE_TOTAL=$((CIRCLE_NODE_TOTAL - 1))
RUN_STEPS=$(seq 2 "$STEPS" | circleci tests split)
fi
else
@ -59,11 +59,11 @@ STEP=1
# Run SMTChecker tests separately, as the heaviest expected run.
[[ " $RUN_STEPS " =~ " $STEP " ]] && EVM=istanbul OPTIMIZE=1 ABI_ENCODER_V1=1 BOOST_TEST_ARGS="-t smtCheckerTests/*" "${REPODIR}/.circleci/soltest.sh"
STEP=$(($STEP + 1))
STEP=$((STEP + 1))
# Run without SMTChecker tests.
[[ " $RUN_STEPS " =~ " $STEP " ]] && EVM=istanbul OPTIMIZE=1 ABI_ENCODER_V1=1 BOOST_TEST_ARGS="-t !smtCheckerTests" "${REPODIR}/.circleci/soltest.sh"
STEP=$(($STEP + 1))
STEP=$((STEP + 1))
for OPTIMIZE in "${OPTIMIZE_VALUES[@]}"
do
@ -74,11 +74,11 @@ do
[ "${EVM}" = "byzantium" ] && [ "${OPTIMIZE}" = "0" ] && EWASM_ARGS="--ewasm"
[[ " $RUN_STEPS " =~ " $STEP " ]] && EVM="$EVM" OPTIMIZE="$OPTIMIZE" SOLTEST_FLAGS="$SOLTEST_FLAGS $EWASM_ARGS" BOOST_TEST_ARGS="-t !@nooptions" "${REPODIR}/.circleci/soltest.sh"
STEP=$(($STEP + 1))
STEP=$((STEP + 1))
done
done
if (($STEP != $STEPS + 1))
if ((STEP != STEPS + 1))
then
echo "Step counter not properly adjusted!" >&2
exit 1

View File

@ -282,7 +282,7 @@ printTask "Running general commandline tests..."
inputFiles="$(ls -1 "${tdir}/input."* 2> /dev/null || true)"
inputCount="$(echo "${inputFiles}" | wc -w)"
if (( ${inputCount} > 1 ))
if (( inputCount > 1 ))
then
printError "Ambiguous input. Found input files in multiple formats:"
echo -e "${inputFiles}"