aboutsummaryrefslogtreecommitdiff
path: root/kernel/test.c
diff options
context:
space:
mode:
authorMarvin Borner2020-08-30 09:59:03 +0200
committerMarvin Borner2020-08-30 09:59:03 +0200
commitf73592503981eaacf1836f0d0049bed2f989212e (patch)
treeb10ec58e932a94022c36fe6e1de2b7bbc20fc838 /kernel/test.c
parente15051fd2d1d65af315ac4004256d5bc56a6dc67 (diff)
Added kernel testing suit
Diffstat (limited to 'kernel/test.c')
-rw-r--r--kernel/test.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/kernel/test.c b/kernel/test.c
new file mode 100644
index 0000000..b328a2c
--- /dev/null
+++ b/kernel/test.c
@@ -0,0 +1,34 @@
+// MIT License, Copyright (c) 2020 Marvin Borner
+
+#include <assert.h>
+#include <boot.h>
+#include <cpu.h>
+#include <fs.h>
+#include <keyboard.h>
+#include <load.h>
+#include <mem.h>
+#include <mouse.h>
+#include <serial.h>
+#include <syscall.h>
+#include <timer.h>
+
+void test_all(struct vid_info *vid_info)
+{
+ heap_init(0x00f00000);
+ boot_passed = vid_info;
+
+ // Serial connection
+ serial_install();
+ serial_print("\nConnected testing.\n");
+ assert(vid_info && vid_info->mode && vid_info->vbe);
+
+ // Install drivers
+ interrupts_install();
+ timer_install();
+ keyboard_install();
+ mouse_install();
+
+ ls_root();
+
+ idle();
+}