commit eb90ca298bfe6cb80186044919a5d3c0f2f56880
parent 8e65a81bfc7b706ced7612bf1f561cea24f41de2
Author: Georges Dupéron <georges.duperon@gmail.com>
Date: Tue, 26 Jun 2018 02:16:12 +0200
Included a test target in the main Makefile, to run all tests
Diffstat:
3 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/.travis.yml b/.travis.yml
@@ -37,4 +37,4 @@ env:
script:
- (cd example-os && make)
- - xvfb-run ./test/${MODE}.sh
-\ No newline at end of file
+ - xvfb-run -a ./test/${MODE}.sh
+\ No newline at end of file
diff --git a/example-os/Makefile b/example-os/Makefile
@@ -1,5 +1,24 @@
+.PHONY: all
all: os.sh
os.sh: os.asm Makefile
nasm -o $@ $<
chmod a+x $@
+
+.PHONY: test
+test: test-qemu-system-i386 test-qemu-system-arm test-virtualbox test-bochs
+
+.PHONY: test-qemu-system-i386
+test-qemu-system-i386:
+ (cd .. && xvfb-run -a ./test/qemu-system-i386.sh)
+
+.PHONY: test-qemu-system-arm
+test-qemu-system-arm:
+ (cd .. && xvfb-run -a ./test/qemu-system-arm.sh)
+
+.PHONY: test-virtualbox
+test-virtualbox:
+ (cd .. && xvfb-run -a ./test/virtualbox.sh)
+
+.PHONY: test-bochs
+ (cd .. && xvfb-run -a ./test/bochs.sh)
diff --git a/test/all.sh b/test/all.sh
@@ -0,0 +1,4 @@
+xvfb-run ./test/qemu-system-i386.sh
+xvfb-run ./test/qemu-system-arm.sh
+xvfb-run ./test/virtualbox.sh
+xvfb-run ./test/bochs.sh
+\ No newline at end of file