mesa/src/intel/tools/tests/run-test.sh
Danylo Piliaiev 430823c96b intel/tools: add binary output type to i965_asm
Add '-t,--type' command line option to specify the output type
which can be 'bin', 'c_literal' or 'hex'.

Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
2019-08-05 17:19:09 +00:00

27 lines
525 B
Bash

#!/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}" -t hex -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