Skip to content

rustpkg: Silence extra output from rustpkg tests #7439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions src/librustpkg/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ fn command_line_test(args: &[~str], cwd: &Path) -> ProcessOutput {
err_fd: None
});
let output = prog.finish_with_output();
io::println(fmt!("Output from command %s with args %? was %s {%s}[%?]",
debug!("Output from command %s with args %? was %s {%s}[%?]",
cmd, args, str::from_bytes(output.output),
str::from_bytes(output.error),
output.status));
output.status);
/*
By the way, rustpkg *won't* return a nonzero exit code if it fails --
see #4547
Expand Down
6 changes: 5 additions & 1 deletion src/librustpkg/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ pub fn compile_input(ctxt: &Ctx,
Lib => lib_crate,
Test | Bench | Main => bin_crate
};
let matches = getopts(~[~"-Z", ~"time-passes"]
let matches = getopts(debug_flags()
+ match what {
Lib => ~[~"--lib"],
// --test compiles both #[test] and #[bench] fns
Expand Down Expand Up @@ -415,3 +415,7 @@ mod test {
}

}

// tjc: cheesy
fn debug_flags() -> ~[~str] { ~[] }
// static debug_flags: ~[~str] = ~[~"-Z", ~"time-passes"];