contenttest: Fail if Servo exits with non-zero status

Remove "let stdout" to make the borrow checker happy.
This commit is contained in:
Keegan McAllister 2013-12-11 15:16:01 -08:00
parent e349bfadb7
commit 8891587901

View file

@ -100,10 +100,9 @@ fn run_test(file: ~str) {
}; };
let mut prc = Process::new(config).unwrap(); let mut prc = Process::new(config).unwrap();
let stdout = prc.io[1].get_mut_ref();
let mut output = ~[]; let mut output = ~[];
loop { loop {
let byte = stdout.read_byte(); let byte = prc.io[1].get_mut_ref().read_byte();
match byte { match byte {
Some(byte) => { Some(byte) => {
print!("{}", byte as char); print!("{}", byte as char);
@ -120,4 +119,9 @@ fn run_test(file: ~str) {
fail!(line); fail!(line);
} }
} }
let retval = prc.wait();
if retval != 0 {
fail!("Servo exited with non-zero status {}", retval);
}
} }