Move PIT test to test module
This commit is contained in:
parent
8cfa7bc009
commit
db2814596b
@ -93,15 +93,10 @@ void hulk_start()
|
|||||||
|
|
||||||
resume_interrupts();
|
resume_interrupts();
|
||||||
|
|
||||||
/* Check that PIT millisecond interrupt is firing. */
|
Test.run();
|
||||||
size_t uptime = Time.uptime();
|
|
||||||
while (Time.uptime() <= uptime)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
Klog.writefln("\a5HULK Initialization Complete!");
|
Klog.writefln("\a5HULK Initialization Complete!");
|
||||||
|
|
||||||
/* Run kernel tests. */
|
/* Run kernel tests. */
|
||||||
Test.run();
|
|
||||||
|
|
||||||
/* Idle loop. */
|
/* Idle loop. */
|
||||||
Time.msleep(1);
|
Time.msleep(1);
|
||||||
|
@ -5,6 +5,7 @@ module hulk.test;
|
|||||||
|
|
||||||
import hulk.klog;
|
import hulk.klog;
|
||||||
import hulk.list;
|
import hulk.list;
|
||||||
|
import hulk.time;
|
||||||
|
|
||||||
struct Test
|
struct Test
|
||||||
{
|
{
|
||||||
@ -14,10 +15,21 @@ struct Test
|
|||||||
public static void run()
|
public static void run()
|
||||||
{
|
{
|
||||||
Klog.writefln("\a3Running kernel tests");
|
Klog.writefln("\a3Running kernel tests");
|
||||||
|
test_pit();
|
||||||
test_list();
|
test_list();
|
||||||
Klog.writefln("\a3Kernel tests complete");
|
Klog.writefln("\a3Kernel tests complete");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void test_pit()
|
||||||
|
{
|
||||||
|
Klog.writefln("Testing PIT...");
|
||||||
|
/* Check that PIT millisecond interrupt is firing. */
|
||||||
|
size_t uptime = Time.uptime();
|
||||||
|
while (Time.uptime() <= uptime)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void test_list()
|
private static void test_list()
|
||||||
{
|
{
|
||||||
Klog.writefln("Testing list...");
|
Klog.writefln("Testing list...");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user