mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-17 06:47:49 +00:00
Implement code for integration test post
This commit is contained in:
14
src/main.rs
14
src/main.rs
@@ -3,22 +3,12 @@
|
||||
#![cfg_attr(not(test), no_main)] // disable all Rust-level entry points
|
||||
#![cfg_attr(test, allow(dead_code, unused_macros))] // allow unused code in test mode
|
||||
|
||||
extern crate spin;
|
||||
extern crate volatile;
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate array_init;
|
||||
#[cfg(test)]
|
||||
extern crate std;
|
||||
extern crate blog_os;
|
||||
|
||||
#[cfg(not(test))]
|
||||
use core::panic::PanicInfo;
|
||||
|
||||
#[macro_use]
|
||||
mod vga_buffer;
|
||||
|
||||
/// This function is the entry point, since the linker looks for a function
|
||||
/// named `_start_` by default.
|
||||
#[cfg(not(test))]
|
||||
@@ -36,4 +26,4 @@ pub extern "C" fn _start() -> ! {
|
||||
pub fn panic(info: &PanicInfo) -> ! {
|
||||
println!("{}", info);
|
||||
loop {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user