aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile6
-rw-r--r--tests/hello-world/source.mk4
-rw-r--r--tests/noop/source.mk4
3 files changed, 10 insertions, 4 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 2012107..00b523e 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -32,3 +32,9 @@ check: $(TESTS)
build/printf.o: common/printf.c
mkdir -p build
$(COMPILE) -c common/printf.c -o build/printf.o
+
+RM ?= rm
+
+.PHONY: clean
+clean:
+ $(RM) -rf build
diff --git a/tests/hello-world/source.mk b/tests/hello-world/source.mk
index 203a42e..52d642d 100644
--- a/tests/hello-world/source.mk
+++ b/tests/hello-world/source.mk
@@ -4,5 +4,5 @@ TESTS := $(TESTS) hello-world
hello-world: hello-world/init.c $(COMMON)
mkdir -p build/hello-world
$(COMPILE) hello-world/init.c build/printf.o -o build/hello-world/init
- echo build/hello-world/init | $(GEN_INITRD) hello-world/initrd
- $(QEMU) hello-world/initrd | grep 'Hello, world!'
+ echo build/hello-world/init | $(GEN_INITRD) build/hello-world/initrd
+ $(QEMU) build/hello-world/initrd | grep 'Hello, world!'
diff --git a/tests/noop/source.mk b/tests/noop/source.mk
index 087ce9b..3745e37 100644
--- a/tests/noop/source.mk
+++ b/tests/noop/source.mk
@@ -4,5 +4,5 @@ TESTS := $(TESTS) noop
noop: noop/init.c $(COMMON)
mkdir -p build/noop
$(COMPILE) noop/init.c build/printf.o -o build/noop/init
- echo build/noop/init | $(GEN_INITRD) noop/initrd
- $(QEMU) noop/initrd | grep 'OK'
+ echo build/noop/init | $(GEN_INITRD) build/noop/initrd
+ $(QEMU) build/noop/initrd | grep 'OK'