tests: Make arm-asm-testsuite.sh print the failed test cases.

This commit is contained in:
Danny Milosavljevic 2021-01-05 16:14:25 +01:00 committed by Ramsay Jones
parent 0c399306b8
commit 77a6a9166d

View File

@ -120,11 +120,33 @@ done
successful_count="$(ls -1 "${state}/ok-"* |wc -l)"
total_count="$(ls -1 "${state}/as-"*.o |wc -l)"
rm -rf "${state}"
echo "${successful_count} of ${total_count} tests succeeded.">&2
if [ "${successful_count}" -eq "${total_count}" ]
then
rm -rf "${state}"
exit 0
else
exit 1
status=0
for s in "${state}/as-"*.o
do
test="$(basename "$s")"
test="${test%.o}"
test="${test#as-}"
t="${state}/ok-${test}"
if [ ! -f "$t" ]
then
case "${test}" in
"bl r3"|"b r3"|"mov r2, #0xEFFF"|"mov r4, #0x0201")
known_failure=" (known failure)"
;;
*)
known_failure=""
status=1
;;
esac
echo "Failed test: ${test}${known_failure}">&2
fi
done
rm -rf "${state}"
exit "${status}"
fi