Add test for testing expected failures

This commit is contained in:
Patrick Pelissier committed 2020-05-09 10:56:31 +02:00
1 parent 34f70a031f
commit 4426a60904
2 files changed
+61 -1

No files matched your search

+13 -1
View File
@@ -63,7 +63,7 @@ depend:
# Clean
#####################################################################################################
check: depend
check: depend checkfail
$(MAKE) `ls test-*.c|$(SED) 's/\.c/\.log/g'`
clean:
@@ -74,6 +74,18 @@ clean:
distclean: clean
$(RM) *.depend depend
checkfail: fail-no-oplist
#####################################################################################################
# Proper failure generation (test if the code properly fails to compile)
#####################################################################################################
# TODO: should grep failure message?
fail-no-oplist:
for i in 1 2 3 4 5 6 ; do \
if $(CC) $(CFLAGS) $(CPPFLAGS) -g -c fail-no-oplist.c -o tmp.o -DTEST=$$i 2> fail-no-oplist-$$i.log ; then echo FAILURE: fail-no-oplist-$$i ; false; else echo OK: fail-no-oplist-$$i ; fi \
done
#####################################################################################################
# Code generation analysis