aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa/check.sh
blob: f38d3f0de52a0106e48ba8bdb5f9ef85a6a4cbd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# $1: binary file to check
# $2: output check token

elffile="$1"
token="$2"

if [ ! -f $elffile ]; then
	>&2 echo "ERROR: $elffile not found"
	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

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