From 77a6a9166d7b17493b44e90f759534428104e543 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Tue, 5 Jan 2021 16:14:25 +0100 Subject: [PATCH] tests: Make arm-asm-testsuite.sh print the failed test cases. --- tests/arm-asm-testsuite.sh | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/tests/arm-asm-testsuite.sh b/tests/arm-asm-testsuite.sh index 18219ce6..f23dbaeb 100755 --- a/tests/arm-asm-testsuite.sh +++ b/tests/arm-asm-testsuite.sh @@ -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