mes/make/check-tinycc.make
Jan Nieuwenhuizen a4a323c2bb test: Run 33/55 tests of ../tinycc/tests/test2 if avaiable.
* make/check-tinycc.make: New file.
* tinycc/tinycc.make: New file.
* GNUmakefile (SUBDIRS): Add tinycc.
2017-05-04 19:41:45 +02:00

20 lines
452 B
Makefile

ifeq ($(TEST),)
TEST:=$(TARGET)-check
$(TEST): EXT:=$(EXT)
$(TEST): EXPECT:=$(EXPECT)
$(TEST): $(OUT)/$(TARGET)
ifeq ($(EXPECT),)
$< - arg1 arg2 arg3 arg4 > $(<:.$(EXT)=.stdout)
else
$<; r=$$?; [ $$r = $(EXPECT) ]
endif
$(QUIETx)if diff -bu $(TINYCC_TEST2)/$(<F:.$(EXT)=.expect) $(<:.$(EXT)=.stdout); \
then rm -f $(<:.$(EXT)=.stdout); \
else exit 1; \
fi
endif
CHECK+=$(TEST)
$(TEST): TEST:=$(TEST)
$(DIR)-check: $(TEST)
include make/reset.make