Rollup merge of #23846 - rayglover:patch-rustdoc-stderr, r=alexcrichton

Currently if a rustdoc test panics then the fatal error message is not forwarded to the user. This change will have the test runner prefer forwarding anything on the stderr of the test process.
This commit is contained in:
Manish Goregaokar 2015-03-31 09:04:37 +05:30
commit e76b412763

View File

@ -243,8 +243,9 @@ fn runtest(test: &str, cratename: &str, libs: SearchPaths,
if should_panic && out.status.success() {
panic!("test executable succeeded when it should have failed");
} else if !should_panic && !out.status.success() {
panic!("test executable failed:\n{:?}",
str::from_utf8(&out.stdout));
panic!("test executable failed:\n{}\n{}",
str::from_utf8(&out.stdout).unwrap_or(""),
str::from_utf8(&out.stderr).unwrap_or(""));
}
}
}