~mcf/cproc

ref: 0e9f74cb67f2227f888e9a127624f77d83aee270 cproc/runtests -rwxr-xr-x 304 bytes
0e9f74cbMichael Forney Use enum type for expr->builtin.kind 1 year, 11 months ago
                                                                                
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:=./cc-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