summaryrefslogtreecommitdiff
path: root/run-tests.sh
blob: 180ce05e533edc630fa83099389520db69751711 (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
38
39
40
41
#!/bin/sh

#set -e

ir3compiler=$HOME/src/mesa/mesa/src/gallium/drivers/freedreno/ir3_compiler

make -j4

fail=0
pass=0
failed=""

for f in `find tgsi -name \*.tgsi`; do
	out="${f#tgsi/}"
	out="${out%\.tgsi}.asm"
	ref="reference/$out"
	out="out/$out"
	mkdir -p `dirname $out`
	echo "Processing: $f"
	args=`head -1 $ref`
	args="${args#; options:}"
	$ir3compiler $args $f >& $out
	./ir3test $ref $out
	res=$?
	if [ $res = 0 ]; then
		pass=$((pass + 1))
	else
		fail=$((fail + 1))
		# XXX use tgsi, not ref..
		failed="$ref $failed"
	fi
done

echo "---------------------"
echo "---------------------"
echo "Pass: $pass"
echo "Fail: $fail"
echo "failed:"
for f in $failed; do
	echo $f
done