Skip to content

Commit 3dfbc5a

Browse files
committed
rustpkg: Silence extra output from rustpkg tests
Closes #7250
1 parent 4c86a04 commit 3dfbc5a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/librustpkg/tests.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ fn command_line_test(args: &[~str], cwd: &Path) -> ProcessOutput {
144144
err_fd: None
145145
});
146146
let output = prog.finish_with_output();
147-
io::println(fmt!("Output from command %s with args %? was %s {%s}[%?]",
147+
debug!("Output from command %s with args %? was %s {%s}[%?]",
148148
cmd, args, str::from_bytes(output.output),
149149
str::from_bytes(output.error),
150-
output.status));
150+
output.status);
151151
/*
152152
By the way, rustpkg *won't* return a nonzero exit code if it fails --
153153
see #4547

src/librustpkg/util.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ pub fn compile_input(ctxt: &Ctx,
187187
Lib => lib_crate,
188188
Test | Bench | Main => bin_crate
189189
};
190-
let matches = getopts(~[~"-Z", ~"time-passes"]
190+
let matches = getopts(debug_flags()
191191
+ match what {
192192
Lib => ~[~"--lib"],
193193
// --test compiles both #[test] and #[bench] fns
@@ -415,3 +415,7 @@ mod test {
415415
}
416416

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

0 commit comments

Comments
 (0)