Skip to content

Commit c685e08

Browse files
committed
Don't redirect output in rustpkg test
Previously, if tests failed, you'd only get stderr which isn't very useful, especially if the failure didn't happen directly in a test function (e.g None.unwrap()).
1 parent 92e7bb6 commit c685e08

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/librustpkg/rustpkg.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -620,14 +620,8 @@ impl CtxMethods for BuildContext {
620620
match built_test_in_workspace(pkgid, workspace) {
621621
Some(test_exec) => {
622622
debug!("test: test_exec = %s", test_exec.to_str());
623-
let p_output = run::process_output(test_exec.to_str(), [~"--test"]);
624-
if p_output.status == 0 {
625-
println(str::from_utf8(p_output.output));
626-
}
627-
else {
628-
println(str::from_utf8(p_output.error));
629-
}
630-
os::set_exit_status(p_output.status);
623+
let status = run::process_status(test_exec.to_str(), [~"--test"]);
624+
os::set_exit_status(status);
631625
}
632626
None => {
633627
error(fmt!("Internal error: test executable for package ID %s in workspace %s \

0 commit comments

Comments
 (0)