mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-23 12:58:09 +02:00
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>
27 lines
525 B
Bash
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
|