aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa/check.sh
blob: 8e889175d2ef9a5e3f29d5734b480075872af122 (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
33
34
35
36
37
# $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

if [ -f $token ]; then
	echo "ALREADY PASSED: $elffile"
	exit
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