tests,cpu-tests,Makefile: refine
This commit is contained in:
parent
2e7c5934ed
commit
dbe346eb85
1 changed files with 3 additions and 3 deletions
|
@ -10,16 +10,16 @@ COLOR_NONE = \033[0m
|
||||||
ALL = $(basename $(notdir $(shell find tests/. -name "*.c")))
|
ALL = $(basename $(notdir $(shell find tests/. -name "*.c")))
|
||||||
|
|
||||||
all: $(addprefix Makefile., $(ALL))
|
all: $(addprefix Makefile., $(ALL))
|
||||||
@echo "" $(ALL)
|
@echo "test list [$(words $(ALL)) item(s)]:" $(ALL)
|
||||||
|
|
||||||
$(ALL): %: Makefile.%
|
$(ALL): %: Makefile.%
|
||||||
|
|
||||||
Makefile.%: tests/%.c latest
|
Makefile.%: tests/%.c latest
|
||||||
@/bin/echo -e "NAME = $*\nSRCS = $<\ninclude $${AM_HOME}/Makefile" > $@
|
@/bin/echo -e "NAME = $*\nSRCS = $<\ninclude $${AM_HOME}/Makefile" > $@
|
||||||
@if make -s -f $@ ARCH=$(ARCH) $(MAKECMDGOALS); then \
|
@if make -s -f $@ ARCH=$(ARCH) $(MAKECMDGOALS); then \
|
||||||
printf "[%14s] $(COLOR_GREEN)PASS!$(COLOR_NONE)\n" $* >> $(RESULT); \
|
printf "[%14s] $(COLOR_GREEN)PASS$(COLOR_NONE)\n" $* >> $(RESULT); \
|
||||||
else \
|
else \
|
||||||
printf "[%14s] $(COLOR_RED)FAIL!$(COLOR_NONE)\n" $* >> $(RESULT); \
|
printf "[%14s] $(COLOR_RED)***FAIL***$(COLOR_NONE)\n" $* >> $(RESULT); \
|
||||||
fi
|
fi
|
||||||
-@rm -f Makefile.$*
|
-@rm -f Makefile.$*
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue