Skip to content

Commit

Permalink
Convert libc::SIGABRT to i32
Browse files Browse the repository at this point in the history
  • Loading branch information
Grez Lu authored and Grez Lu committed Aug 28, 2024
1 parent 1b259e0 commit 923d689
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/test/src/test_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@ pub fn get_result_from_exit_code(
time_opts: &Option<time::TestTimeOptions>,
exec_time: &Option<time::TestExecTime>,
) -> TestResult {
let _sigabrt = libc::SIGABRT as i32;
let result = match status.code() {
Some(TR_OK) => TestResult::TrOk,
#[cfg(windows)]
Some(STATUS_ABORTED) => TestResult::TrFailed,
#[cfg(unix)]
None => match status.signal() {
Some(libc::SIGABRT) => TestResult::TrFailed,
Some(_sigabrt) => TestResult::TrFailed,
Some(signal) => {
TestResult::TrFailedMsg(format!("child process exited with signal {signal}"))
}
Expand Down

0 comments on commit 923d689

Please sign in to comment.