> compile NEMU
ysyx_22040000 李心杨 Linux calcite 6.6.19 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar 1 12:35:11 UTC 2024 x86_64 GNU/Linux 16:26:21 up 4 days 3:32, 2 users, load average: 0.85, 0.91, 0.95
This commit is contained in:
parent
a210694e82
commit
d08c2860da
415 changed files with 44314 additions and 11 deletions
35
am-kernels/tests/cpu-tests/Makefile
Normal file
35
am-kernels/tests/cpu-tests/Makefile
Normal file
|
@ -0,0 +1,35 @@
|
|||
.PHONY: all run gdb clean latest $(ALL)
|
||||
|
||||
RESULT = .result
|
||||
$(shell > $(RESULT))
|
||||
|
||||
COLOR_RED = \033[1;31m
|
||||
COLOR_GREEN = \033[1;32m
|
||||
COLOR_NONE = \033[0m
|
||||
|
||||
ALL = $(basename $(notdir $(shell find tests/. -name "*.c")))
|
||||
|
||||
all: $(addprefix Makefile., $(ALL))
|
||||
@echo "test list [$(words $(ALL)) item(s)]:" $(ALL)
|
||||
|
||||
$(ALL): %: Makefile.%
|
||||
|
||||
Makefile.%: tests/%.c latest
|
||||
@echo -e "NAME = $*\nSRCS = $<\ninclude $${AM_HOME}/Makefile" > $@
|
||||
@if make -s -f $@ ARCH=$(ARCH) $(MAKECMDGOALS); then \
|
||||
printf "[%14s] $(COLOR_GREEN)PASS$(COLOR_NONE)\n" $* >> $(RESULT); \
|
||||
else \
|
||||
printf "[%14s] $(COLOR_RED)***FAIL***$(COLOR_NONE)\n" $* >> $(RESULT); \
|
||||
fi
|
||||
-@rm -f Makefile.$*
|
||||
|
||||
run: all
|
||||
@cat $(RESULT)
|
||||
@rm $(RESULT)
|
||||
|
||||
gdb: all
|
||||
|
||||
clean:
|
||||
rm -rf Makefile.* build/
|
||||
|
||||
latest:
|
Loading…
Add table
Add a link
Reference in a new issue