tests: Call arm-asm-testsuite.sh on "asmtest" target.

This commit is contained in:
Danny Milosavljevic 2021-01-05 04:18:45 +01:00 committed by Ramsay Jones
parent 425bd2a3db
commit 0c399306b8
2 changed files with 9 additions and 2 deletions

View File

@ -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)

View File

@ -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}" ]