aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa/check.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/mppa/check.sh')
-rw-r--r--test/mppa/check.sh56
1 files changed, 32 insertions, 24 deletions
diff --git a/test/mppa/check.sh b/test/mppa/check.sh
index 813796d9..8e889175 100644
--- a/test/mppa/check.sh
+++ b/test/mppa/check.sh
@@ -1,29 +1,37 @@
+# $1: binary file to check
+# $2: output check token
-while [ $# -gt 0 ]; do
- elffile="$1"
-
- if [ ! -f $elffile ]; then
- >&2 echo "ERROR: $elffile not found"
- shift; continue
- fi
+elffile="$1"
+token="$2"
- dir="$(dirname $elffile)"
- elf="$(basename $elffile)"
- exp="$dir/output/$elf.exp"
- out="$dir/output/$elf.out"
- if [ ! -f $exp ]; then
- >&2 echo "ERROR: $exp not found"
- shift; continue
- fi
+if [ ! -f $elffile ]; then
+ >&2 echo "ERROR: $elffile not found"
+ shift; continue
+fi
- k1-cluster -- $elffile > $out
- echo $? >> $out
+if [ -f $token ]; then
+ echo "ALREADY PASSED: $elffile"
+ exit
+fi
- if ! diff $exp $out; then
- >&2 echo "ERROR: $exp and $out differ"
- shift; continue
- fi
+dir="$(dirname $elffile)"
+elf="$(basename $elffile)"
+exp="$dir/output/$elf.exp"
+out="$dir/output/$elf.out"
+if [ ! -f $exp ]; then
+ >&2 echo "ERROR: $exp not found"
+ shift; continue
+fi
- echo "PASSED: $elf"
- shift
-done
+k1-cluster -- $elffile > $out
+echo $? >> $out
+
+if ! diff $exp $out; then
+ >&2 echo "ERROR: $exp and $out differ"
+ exit
+ #shift; continue
+fi
+
+echo "PASSED: $elf"
+touch $token
+#shift