test: fix run.sh for older bash versions
Replace `((NUM++))` with `NUM=$((NUM+1))` such that the script also runs
on older versions of bash.
#!/bin/bash
+# Copyright (c) 2017 Fabian Schuiki
+## This script runs the source files in tests through the compiler.
+
set -e
CRST=`tput sgr0`
CNAME=`tput bold`
@@ -27,11 +30,11 @@ while read -d $'\0' SRCFILE; do
while read TOP; do
echo -n " elaborating ${CNAME}$TOP${CRST} ..."
if ! $COMPILE_RESULT &> $TMP || ! $MOORE elaborate $TOP &> $TMP; then
- ((NUM_FAIL++))
+ NUM_FAIL=$((NUM_FAIL+1))
echo " ${CFAIL}failed${CRST}"
cat $TMP
else
- ((NUM_PASS++))
+ NUM_PASS=$((NUM_PASS+1))
echo " ${CPASS}passed${CRST}"
fi
done < <(grep -o -E '@elab\s+.*' $SRCFILE | cut -f 2 -d " ")
