diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-07-26 15:36:23 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-07-26 15:36:58 -0700 |
| commit | d52169686bb6c743dc508ac6ab4088f4941d43f5 (patch) | |
| tree | 8b1d817c16d482be4c57e799ddc543ef2bceb665 | |
| parent | a17735cfb590b18f297771360616bc3ccf785406 (diff) | |
Dump all subprocess output to stdout when running verbose compiler tests
| -rw-r--r-- | src/test/compiletest/compiletest.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/compiletest/compiletest.rs b/src/test/compiletest/compiletest.rs index b424b4bf605..fec38cbb756 100644 --- a/src/test/compiletest/compiletest.rs +++ b/src/test/compiletest/compiletest.rs @@ -500,11 +500,21 @@ fn dump_output(&config config, &str testfile, &str out) { auto outfile = make_out_name(config, testfile); auto writer = io::file_writer(outfile, [io::create, io::truncate]); writer.write_str(out); + maybe_dump_to_stdout(config, out); } // FIXME (726): Can't use file_writer on mac #[cfg(target_os = "macos")] fn dump_output(&config config, &str testfile, &str out) { + maybe_dump_to_stdout(config, out); +} + +fn maybe_dump_to_stdout(&config config, &str out) { + if (config.verbose) { + io::stdout().write_line("------------------------------------------"); + io::stdout().write_line(out); + io::stdout().write_line("------------------------------------------"); + } } fn make_out_name(&config config, &str testfile) -> str { |
