Skip to content

Commit f0072e7

Browse files
author
Ellen Arteca
committed
check status of cc for SO file
1 parent 7d0ad06 commit f0072e7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/compiletest.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fn run_tests(mode: Mode, path: &str, target: Option<String>) -> Result<()> {
4242
// If we're on linux, then build the shared object file for testing external C function calls.
4343
if cfg!(target_os = "linux") {
4444
let cc = option_env!("CC").unwrap_or("cc");
45-
Command::new(cc)
45+
let cc_output = Command::new(cc)
4646
.args([
4747
"-shared",
4848
"-o",
@@ -56,6 +56,9 @@ fn run_tests(mode: Mode, path: &str, target: Option<String>) -> Result<()> {
5656
])
5757
.output()
5858
.expect("failed to generate shared object file for testing external C function calls");
59+
if !cc_output.status.success() {
60+
panic!("error in generating shared object file for testing external C function calls");
61+
}
5962
}
6063

6164
let skip_ui_checks = env::var_os("MIRI_SKIP_UI_CHECKS").is_some();

0 commit comments

Comments
 (0)