aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/tools/tests/run-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/tools/tests/run-test.sh')
-rw-r--r--src/intel/tools/tests/run-test.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/intel/tools/tests/run-test.sh b/src/intel/tools/tests/run-test.sh
new file mode 100644
index 00000000000..803fe0f1b6d
--- /dev/null
+++ b/src/intel/tools/tests/run-test.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+SRCDIR="${srcdir}"
+I965_ASM="$1"
+
+test="TEST"
+
+if [ -n "$2" ] ; then
+ test="$2"
+fi
+
+if [ -n "$3" ] ; then
+ gen="$3"
+fi
+
+for file in ${SRCDIR}/${test}/*.asm; do
+ if [ -f "$file" ]; then
+ filename="${file%.*}"
+ "${I965_ASM}" -g ${gen} -o "${file}.out" "${file}"
+ if cmp "${file}.out" "${filename}.expected" 2> /dev/null; then
+ echo "${file} : PASS"
+ else
+ echo "Output comparison for ${file}"
+ diff -u "${filename}.expected" "${file}.out"
+ fi
+ fi
+done