summaryrefslogtreecommitdiff
path: root/kernel/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/src/lib.rs')
-rw-r--r--kernel/src/lib.rs22
1 files changed, 7 insertions, 15 deletions
diff --git a/kernel/src/lib.rs b/kernel/src/lib.rs
index d8b49b4..59888d1 100644
--- a/kernel/src/lib.rs
+++ b/kernel/src/lib.rs
@@ -3,26 +3,18 @@
#![feature(custom_test_frameworks)]
#![feature(abi_x86_interrupt)]
#![feature(panic_info_message)]
-#![test_runner(crate::test_runner)]
+#![test_runner(crate::testing::serial_test_runner)]
#![reexport_test_harness_main = "test_main"]
#![no_std]
-mod interrupts;
-mod io;
+pub mod interrupts;
+pub mod io;
+pub mod testing;
use core::fmt::Write;
-use io::vga_text::OStream;
-use io::{qemu, serial, vga_text};
-
-#[cfg(test)]
-pub fn test_runner(tests: &[&dyn Fn(&mut OStream)]) {
- let mut stdout = OStream::new();
- stdout.clear();
- write!(&mut stdout, "running {} tests\n", tests.len()).unwrap();
- for test in tests {
- test(&mut stdout)
- }
-}
+pub use io::qemu::{exit_qemu, QemuExitCode};
+pub use io::vga_text::OStream;
+pub use io::{qemu, serial, vga_text};
#[no_mangle]
pub extern "C" fn _start() -> ! {