aboutsummaryrefslogtreecommitdiff
path: root/tests/hello-world
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hello-world')
-rw-r--r--tests/hello-world/init.c14
-rw-r--r--tests/hello-world/source.mk8
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/hello-world/init.c b/tests/hello-world/init.c
new file mode 100644
index 0000000..fc882ec
--- /dev/null
+++ b/tests/hello-world/init.c
@@ -0,0 +1,14 @@
+#include <common/test.h>
+
+START(pid, tid, d0, d1, d2, d3)
+{
+ UNUSED(pid);
+ UNUSED(tid);
+ UNUSED(d0);
+ UNUSED(d1);
+ UNUSED(d2);
+ UNUSED(d3);
+
+ printf("Hello, world!\n");
+ ok();
+}
diff --git a/tests/hello-world/source.mk b/tests/hello-world/source.mk
new file mode 100644
index 0000000..203a42e
--- /dev/null
+++ b/tests/hello-world/source.mk
@@ -0,0 +1,8 @@
+TESTS := $(TESTS) hello-world
+
+.PHONY: 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!'