contenttest: Print stderr

This commit is contained in:
Keegan McAllister 2013-12-11 14:08:38 -08:00
parent acb3d9f533
commit bcc0ae6316

View file

@ -16,7 +16,7 @@ use std::{os, str};
use std::cell::Cell; use std::cell::Cell;
use std::os::list_dir_path; use std::os::list_dir_path;
use std::rt::io::Reader; use std::rt::io::Reader;
use std::rt::io::process::{Process, ProcessConfig, Ignored, CreatePipe}; use std::rt::io::process::{Process, ProcessConfig, Ignored, CreatePipe, InheritFd};
#[deriving(Clone)] #[deriving(Clone)]
struct Config { struct Config {
@ -88,14 +88,15 @@ fn run_test(file: ~str) {
let path = os::make_absolute(&Path::new(file)); let path = os::make_absolute(&Path::new(file));
// FIXME (#1094): not the right way to transform a path // FIXME (#1094): not the right way to transform a path
let infile = ~"file://" + path.display().to_str(); let infile = ~"file://" + path.display().to_str();
let create_pipe = CreatePipe(true, false); // rustc #10228 let stdout = CreatePipe(true, false); // rustc #10228
let stderr = InheritFd(2);
let config = ProcessConfig { let config = ProcessConfig {
program: "./servo", program: "./servo",
args: [~"-z", infile.clone()], args: [~"-z", infile.clone()],
env: None, env: None,
cwd: None, cwd: None,
io: [Ignored, create_pipe, Ignored] io: [Ignored, stdout, stderr]
}; };
let mut prc = Process::new(config).unwrap(); let mut prc = Process::new(config).unwrap();