From caa6e8e9513bfa3af6132571639e0f0cf95a12b5 Mon Sep 17 00:00:00 2001 From: clizia Date: Sun, 31 Aug 2025 21:36:35 +0200 Subject: [PATCH] fix: integration testing --- Cargo.toml | 1 - src/lib.rs | 2 +- src/main.rs | 9 +++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 408fd74..5b7bef3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,4 +36,3 @@ test-args = [ "none", ] test-success-exit-code = 33 # (0x10 << 1) | 1 = 33 -test-timeout = "300" # in seconds diff --git a/src/lib.rs b/src/lib.rs index 5bfdcf0..727bdfe 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -54,7 +54,7 @@ pub extern "C" fn _start() -> ! { #[cfg(test)] #[panic_handler] fn panic(info: &PanicInfo) -> ! { - test_panic_handler(info); + test_panic_handler(info) } #[derive(Debug, Clone, Copy, PartialEq, Eq)] diff --git a/src/main.rs b/src/main.rs index db86ade..579ad9c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,6 +22,15 @@ pub extern "C" fn _start() -> ! { loop {} } +/// this function is called on panic +#[cfg(not(test))] +#[panic_handler] +fn panic(info: &PanicInfo) -> ! { + println!("{}", info); + + loop {} +} + #[cfg(test)] #[panic_handler] fn panic(info: &PanicInfo) -> ! {