pa1.2: add unit tests
This commit is contained in:
parent
9cca9de2a8
commit
e19e89f70e
8 changed files with 235 additions and 14 deletions
|
@ -59,3 +59,14 @@ else
|
|||
# Include rules to build NEMU
|
||||
include $(NEMU_HOME)/scripts/native.mk
|
||||
endif
|
||||
|
||||
.PHONY: test
|
||||
|
||||
include $(NEMU_HOME)/tests/Makefile
|
||||
all-tests: TEST_OBJS = $(filter-out $(OBJ_DIR)/src/nemu-main.o, $(OBJS))
|
||||
all-tests: CFLAGS += $(shell pkg-config --cflags check)
|
||||
all-tests: LDFLAGS += $(shell pkg-config --libs check)
|
||||
all-tests: $(TEST_SRCS:%.c=$(OBJ_DIR)/%)
|
||||
|
||||
test: all-tests
|
||||
@$(OBJ_DIR)/tests/expr_test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue