2017-05-04 17:41:45 +00:00
|
|
|
ifeq ($(TEST),)
|
|
|
|
TEST:=$(TARGET)-check
|
|
|
|
$(TEST): EXT:=$(EXT)
|
|
|
|
$(TEST): EXPECT:=$(EXPECT)
|
2017-05-21 20:25:02 +00:00
|
|
|
$(TEST): SHELL:=$(SHELL)
|
2017-05-04 17:41:45 +00:00
|
|
|
$(TEST): $(OUT)/$(TARGET)
|
2017-05-21 20:25:02 +00:00
|
|
|
@export SHELL=$(SHELL)
|
2017-05-04 17:41:45 +00:00
|
|
|
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
|