Added primitive unit testing in tests/

This commit is contained in:
2016-03-27 12:07:53 -07:00
parent 6642358073
commit 25e3b5c517
6 changed files with 62 additions and 1 deletions

View File

@@ -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