[test_lib] Emit the line number of the test invocation Parameterized tests share the same test name. In order to distinguish them in the test log, emit the line number of the `execute_test!` macro invocation. Signed-off-by: Chris Frantz <cfrantz@google.com>
diff --git a/sw/host/opentitanlib/src/test_utils/mod.rs b/sw/host/opentitanlib/src/test_utils/mod.rs index c07ddf6..4193343 100644 --- a/sw/host/opentitanlib/src/test_utils/mod.rs +++ b/sw/host/opentitanlib/src/test_utils/mod.rs
@@ -38,9 +38,9 @@ #[macro_export] macro_rules! execute_test { ($test:path, $($args:tt)*) => { - println!("Starting test {}...", stringify!($test)); + println!("{}:Starting test {}...", line!(), stringify!($test)); let result = $test($($args)*); - println!("Finished test {}: {:?}", stringify!($test), result); + println!("{}:Finished test {}: {:?}", line!(), stringify!($test), result); let _ = result?; }; }