fix: integration testing

This commit is contained in:
clizia 2025-08-31 21:36:35 +02:00
parent 48f84b895b
commit caa6e8e951
3 changed files with 10 additions and 2 deletions

View file

@ -36,4 +36,3 @@ test-args = [
"none", "none",
] ]
test-success-exit-code = 33 # (0x10 << 1) | 1 = 33 test-success-exit-code = 33 # (0x10 << 1) | 1 = 33
test-timeout = "300" # in seconds

View file

@ -54,7 +54,7 @@ pub extern "C" fn _start() -> ! {
#[cfg(test)] #[cfg(test)]
#[panic_handler] #[panic_handler]
fn panic(info: &PanicInfo) -> ! { fn panic(info: &PanicInfo) -> ! {
test_panic_handler(info); test_panic_handler(info)
} }
#[derive(Debug, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]

View file

@ -22,6 +22,15 @@ pub extern "C" fn _start() -> ! {
loop {} loop {}
} }
/// this function is called on panic
#[cfg(not(test))]
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
println!("{}", info);
loop {}
}
#[cfg(test)] #[cfg(test)]
#[panic_handler] #[panic_handler]
fn panic(info: &PanicInfo) -> ! { fn panic(info: &PanicInfo) -> ! {