Print card name from config in test output

This commit is contained in:
Heiko Schaefer 2021-08-17 14:24:54 +02:00
parent 413e464cff
commit b5ebc6b43c
3 changed files with 6 additions and 2 deletions

View file

@ -46,6 +46,10 @@ impl TestCardApp {
pub fn get_config(&self) -> &Config { pub fn get_config(&self) -> &Config {
&self.config &self.config
} }
pub fn get_name(&self) -> &str {
&self.name
}
} }
impl TestConfig { impl TestConfig {

View file

@ -18,7 +18,7 @@ fn main() -> Result<()> {
let cards = config.get_cards(); let cards = config.get_cards();
for mut card in cards { for mut card in cards {
println!("** Run tests on card {:?} **", card); println!("** Run tests on card '{}' **", card.get_name());
println!("Reset"); println!("Reset");
let _ = run_test(&mut card, test_reset, &[])?; let _ = run_test(&mut card, test_reset, &[])?;

View file

@ -17,7 +17,7 @@ fn main() -> Result<()> {
let cards = config.get_cards(); let cards = config.get_cards();
for mut card in cards { for mut card in cards {
println!("** Run tests on card {:?} **", card); println!("** Run tests on card {} **", card.get_name());
// println!("Get pubkey"); // println!("Get pubkey");
// let _ = run_test(&mut card, test_get_pub, &[])?; // let _ = run_test(&mut card, test_get_pub, &[])?;