From 63f5339b1dfd20245a328aefbdb3b9f06b4d12b4 Mon Sep 17 00:00:00 2001 From: tracer-ysyx Date: Wed, 6 Mar 2024 11:26:05 +0800 Subject: [PATCH] =?UTF-8?q?>=20compile=20NEMU=20ysyx=5F22040000=20?= =?UTF-8?q?=E6=9D=8E=E5=BF=83=E6=9D=A8=20Linux=20calcite=206.6.18=20#1-Nix?= =?UTF-8?q?OS=20SMP=20PREEMPT=5FDYNAMIC=20Fri=20Feb=2023=2008:25:28=20UTC?= =?UTF-8?q?=202024=20x86=5F64=20GNU/Linux=20=2011:26:05=20=20up=201=20day?= =?UTF-8?q?=2014:54,=20=202=20users,=20=20load=20average:=200.33,=200.43,?= =?UTF-8?q?=200.34?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nemu/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nemu/Makefile b/nemu/Makefile index 3399761..899ff1c 100644 --- a/nemu/Makefile +++ b/nemu/Makefile @@ -71,9 +71,12 @@ unit-tests: $(TEST_SRCS:%.c=$(OBJ_DIR)/%) IMAGES = $(patsubst %.bin, %, $(shell find $(IMAGES_PATH) -type f -name '*.bin')) +COLOR_RED = \033[1;31m +COLOR_GREEN = \033[1;32m +COLOR_NONE = \033[0m + $(IMAGES): %: %.bin $(BINARY) - @echo + TEST $(notdir $<) - @$(BINARY) -b $< > /dev/null || echo "Failure" + @$(BINARY) -b $< > /dev/null || printf "[%14s] $(COLOR_RED)***FAIL***$(COLOR_NONE)\n" $< integration-tests: $(IMAGES) @echo $(IMAGES_PATH)