aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa/check.sh
blob: dd9691becd60dfa675c3f874fcabf9bc6e493f28 (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"
	exit
fi

k1-cluster -- $elffile > $out
echo $? >> $out

if ! diff $exp $out; then
	>&2 echo "ERROR: $exp and $out differ"
	exit
fi

echo "PASSED: $elf"
touch $token
#shift