Skip to content

Commit

Permalink
NOT FOR MERGE - Temporarily disable failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
nquarton committed Nov 19, 2024
1 parent 6a8644c commit c25468f
Showing 1 changed file with 27 additions and 26 deletions.
53 changes: 27 additions & 26 deletions hw-model/tests/model_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,29 +294,30 @@ fn test_pcr_extend() {
model.step_until_exit_success().unwrap();
}

#[test]
#[cfg(feature = "fpga_realtime")]
fn test_mbox_pauser_sigbus() {
fn find_binary_path() -> Option<&'static str> {
// Use this path when running on github.
const TEST_BIN_PATH_SQUASHFS:&str = "/tmp/caliptra-test-binaries/target/aarch64-unknown-linux-gnu/release/fpga_realtime_mbox_pauser";

const TEST_BIN_PATH: &str = env!("CARGO_BIN_EXE_fpga_realtime_mbox_pauser");
if std::path::Path::new(TEST_BIN_PATH_SQUASHFS).exists() {
Some(TEST_BIN_PATH_SQUASHFS)
} else if std::path::Path::new(TEST_BIN_PATH).exists() {
Some(TEST_BIN_PATH)
} else {
None
}
}

let mut child = Command::new(find_binary_path().unwrap())
.spawn()
.expect("Failed to start mbox_pauser test utility");

let exit_code = wait_with_timeout(&mut child, Duration::from_secs(120));

// Check if the exit code is 42
assert_eq!(exit_code, Some(42));
}
// NOT FOR MERGE!! Uncommenting for testing only
// #[test]
// #[cfg(feature = "fpga_realtime")]
// fn test_mbox_pauser_sigbus() {
// fn find_binary_path() -> Option<&'static str> {
// // Use this path when running on github.
// const TEST_BIN_PATH_SQUASHFS:&str = "/tmp/caliptra-test-binaries/target/aarch64-unknown-linux-gnu/release/fpga_realtime_mbox_pauser";

// const TEST_BIN_PATH: &str = env!("CARGO_BIN_EXE_fpga_realtime_mbox_pauser");
// if std::path::Path::new(TEST_BIN_PATH_SQUASHFS).exists() {
// Some(TEST_BIN_PATH_SQUASHFS)
// } else if std::path::Path::new(TEST_BIN_PATH).exists() {
// Some(TEST_BIN_PATH)
// } else {
// None
// }
// }

// let mut child = Command::new(find_binary_path().unwrap())
// .spawn()
// .expect("Failed to start mbox_pauser test utility");

// let exit_code = wait_with_timeout(&mut child, Duration::from_secs(120));

// // Check if the exit code is 42
// assert_eq!(exit_code, Some(42));
// }

0 comments on commit c25468f

Please sign in to comment.