Skip to content

Commit

Permalink
auto merge of #5174 : ehegnes/servo/issue-5159, r=Manishearth
Browse files Browse the repository at this point in the history
Fix warnings and introduce usage of `std::env` over deprecated `std::os`
functions.
  • Loading branch information
bors-servo committed Mar 8, 2015
2 parents e8ea416 + 20cb2c3 commit e404cf3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/contenttest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(collections, core, io, os, path, rustc_private, std_misc, test)]

extern crate getopts;
extern crate test;

use test::{AutoColor, TestOpts, run_tests_console, TestDesc, TestDescAndFn, DynTestFn, DynTestName};
use test::ShouldFail;
use getopts::{getopts, reqopt};
use std::{os, str};
use std::{os, str, env};
use std::old_io::fs;
use std::old_io::Reader;
use std::old_io::process::{Command, Ignored, CreatePipe, InheritFd, ExitStatus};
Expand All @@ -27,13 +29,13 @@ struct Config {
}

fn main() {
let args = os::args();
let config = parse_config(args.into_iter().collect());
let args = env::args();
let config = parse_config(args.map(|x| x.into_string().unwrap()).collect());
let opts = test_options(config.clone());
let tests = find_tests(config);
match run_tests_console(&opts, tests) {
Ok(false) => os::set_exit_status(1), // tests failed
Err(_) => os::set_exit_status(2), // I/O-related failure
Ok(false) => env::set_exit_status(1), // tests failed
Err(_) => env::set_exit_status(2), // I/O-related failure
_ => (),
}
}
Expand Down

0 comments on commit e404cf3

Please sign in to comment.