diff --git a/tests/Makefile b/tests/Makefile index 9e804271..c79d7ca4 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -223,11 +223,16 @@ asmtest.ref: asmtest.S $(CC) -Wa,-W -o asmtest.ref.o -c asmtest.S objdump -D asmtest.ref.o > asmtest.ref +ifeq ($(ARCH),arm) +asmtest asmtest2: + (cd .. && tests/arm-asm-testsuite.sh) +else asmtest asmtest2: asmtest.ref @echo ------------ $@ ------------ $(TCC) $(MAYBE_RUN_TCC) -c asmtest.S objdump -D asmtest.o > asmtest.out @if diff -u --ignore-matching-lines="file format" asmtest.ref asmtest.out ; then echo "ASM Auto Test OK"; fi +endif # test assembler with tcc compiled by itself asmtest2: MAYBE_RUN_TCC = $(RUN_TCC) diff --git a/tests/arm-asm-testsuite.sh b/tests/arm-asm-testsuite.sh index 7c8ea882..18219ce6 100755 --- a/tests/arm-asm-testsuite.sh +++ b/tests/arm-asm-testsuite.sh @@ -102,11 +102,12 @@ do echo "warning: '$s $args' did not work in tcc (see above)">&2 fi else + rm -f "${tcc_object}" echo "warning: '$s $args' did not work in tcc">&2 fi ok=1 else # GNU as can't do it either--so we don't care - echo -n + rm -f "${as_object}" fi rm -f "${err}" done @@ -116,8 +117,9 @@ do continue fi done + successful_count="$(ls -1 "${state}/ok-"* |wc -l)" -total_count="$(ls -1 "${state}/tcc-"*.o |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}" ]