aboutsummaryrefslogtreecommitdiff
path: root/runtests
blob: 5a8ea898e665c807ce56bf9c078a35272584f610 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

if [ $# = 0 ] ; then
	set -- test/*.c
fi

exitstatus=0
out=$(mktemp)
trap 'rm "$out"' EXIT
for test ; do
	if ${CCQBE:=./cproc-qbe} -o $out $test && diff -Nu "${test%.c}.qbe" "$out" ; then
		result="PASS"
	else
		result="FAIL"
		exitstatus=1
	fi
	echo "[$result] $test" >&2
done

exit $exitstatus