Move tty to arch
This commit is contained in:
parent
c4083b0161
commit
e2533a2264
8 changed files with 2231 additions and 2209 deletions
|
@ -36,4 +36,9 @@ def get_test_cases(TestCase):
|
|||
TestCase("Syscalls init", [r"Init syscalls"]),
|
||||
TestCase("Syscalls tests", [r"Syscalls: Tested no args", r"Syscalls: Tested 1 arg", r"Syscalls: Tested 2 args", r"Syscalls: Tested 3 args", r"Syscalls: Tested 4 args", r"Syscalls: Tested 5 args"]),
|
||||
TestCase("Syscalls done", [r"Done syscalls"]),
|
||||
TestCase("VGA init", [r"Init vga"]),
|
||||
TestCase("VGA tests", [r"VGA: Tested max scan line", r"VGA: Tested cursor shape", r"VGA: Tested updating cursor"]),
|
||||
TestCase("VGA done", [r"Done vga"]),
|
||||
TestCase("TTY tests", [r"TTY: Tested globals", r"TTY: Tested printing"]),
|
||||
|
||||
]
|
||||
|
|
|
@ -7,6 +7,7 @@ const idt = @import("idt_mock.zig");
|
|||
const vmm = @import("vmm_mock.zig");
|
||||
const paging = @import("paging_mock.zig");
|
||||
const Serial = @import("../../../src/kernel/serial.zig").Serial;
|
||||
const TTY = @import("../../../src/kernel/tty.zig").TTY;
|
||||
|
||||
const mock_framework = @import("mock_framework.zig");
|
||||
pub const initTest = mock_framework.initTest;
|
||||
|
@ -106,6 +107,16 @@ pub fn initSerial(boot_payload: BootPayload) Serial {
|
|||
return .{ .write = undefined };
|
||||
}
|
||||
|
||||
pub fn initTTY(boot_payload: BootPayload) TTY {
|
||||
return .{
|
||||
.print = undefined,
|
||||
.setCursor = undefined,
|
||||
.cols = undefined,
|
||||
.rows = undefined,
|
||||
.clear = null,
|
||||
};
|
||||
}
|
||||
|
||||
pub fn initMem(payload: BootPayload) std.mem.Allocator.Error!mem.MemProfile {
|
||||
return MemProfile{
|
||||
.vaddr_end = @ptrCast([*]u8, &KERNEL_VADDR_END),
|
||||
|
|
|
@ -56,16 +56,12 @@ def get_pre_archinit_cases():
|
|||
def get_post_archinit_cases():
|
||||
return [
|
||||
TestCase("Arch init finishes", [r"Arch init done"]),
|
||||
TestCase("VGA init", [r"Init vga"]),
|
||||
TestCase("VGA tests", [r"VGA: Tested max scan line", r"VGA: Tested cursor shape", r"VGA: Tested updating cursor"]),
|
||||
TestCase("VGA done", [r"Done vga"]),
|
||||
|
||||
TestCase("TTY init", [r"Init tty"]),
|
||||
TestCase("TTY tests", [r"TTY: Tested globals", r"TTY: Tested printing"]),
|
||||
TestCase("TTY done", [r"Done tty"]),
|
||||
|
||||
TestCase("Heap", [r"Init heap", r"Done heap"]),
|
||||
|
||||
TestCase("TTY init", [r"Init tty"]),
|
||||
TestCase("TTY done", [r"Done tty"]),
|
||||
|
||||
TestCase("Init finishes", [r"Init done"]),
|
||||
|
||||
TestCase("Panic tests", [r"Kernel panic: integer overflow", r"c[a-z\d]+: panic", r"c[a-z\d]+: panic.runtimeTests", r"c[a-z\d]+: kmain", r"c[a-z\d]+: start_higher_half"], r"\[ERROR\] ")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue