Added primitive unit testing in tests/
This commit is contained in:
10
Makefile
10
Makefile
@@ -1,3 +1,7 @@
|
||||
ifeq ($(TEST_FORMAT),)
|
||||
TEST_FORMAT:=tunit
|
||||
endif
|
||||
|
||||
all: boot.img kernel.bin
|
||||
|
||||
src/%.o: src/%.c
|
||||
@@ -23,9 +27,13 @@ boot.img: boot.bin kernel.bin
|
||||
dd if=boot.tmp of=boot.img conv=notrunc
|
||||
rm -f boot.tmp
|
||||
|
||||
test: boot.img
|
||||
run: boot.img
|
||||
bochs -f bochsrc -q
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
cd tests && make clean && shunit.sh -f $(TEST_FORMAT) -t test.sh
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f boot.bin asm/*o src/*o
|
||||
|
||||
Reference in New Issue
Block a user