Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions test-framework/sudo-test/src/docker/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,15 @@ impl TryFrom<process::Output> for Output {
stdout.pop();
}

// detect Rust panics early: exit code 101 is the default panic exit code
if output.status.code() == Some(101) {
panic!("program panicked (exit code 101)\nstdout:\n{stdout}\n\nstderr:\n{stderr}");
}

if stderr.contains("panicked") {
panic!("program panicked\nstdout:\n{stdout}\n\nstderr:\n{stderr}");
Comment thread
bjorn3 marked this conversation as resolved.
Outdated
}

Ok(Output {
status: output.status,
stderr,
Expand Down
Loading