c3a733618d32a7e617325cec0ced65d88e68d507
[mesa.git] / src / intel / tools / tests / run-test.sh
1 #!/bin/sh
2
3 SRCDIR="${srcdir}"
4 I965_ASM="$1"
5
6 test="TEST"
7
8 if [ -n "$2" ] ; then
9 test="$2"
10 fi
11
12 if [ -n "$3" ] ; then
13 gen="$3"
14 fi
15
16 for file in ${SRCDIR}/${test}/*.asm; do
17 if [ -f "$file" ]; then
18 filename="${file%.*}"
19 "${I965_ASM}" -t hex -g ${gen} -o "${file}.out" "${file}"
20 if cmp "${file}.out" "${filename}.expected" 2> /dev/null; then
21 echo "${file} : PASS"
22 else
23 echo "Output comparison for ${file}"
24 diff -u "${filename}.expected" "${file}.out"
25 fi
26 fi
27 done