diff options
Diffstat (limited to 'src/compiletest')
| -rw-r--r-- | src/compiletest/compiletest.rs | 11 | ||||
| -rw-r--r-- | src/compiletest/runtest.rs | 6 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index b73623223fd..7c0ee7be8a4 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -22,6 +22,7 @@ #![feature(std_misc)] #![feature(test)] #![feature(unicode)] +#![feature(env)] #![deny(warnings)] @@ -31,7 +32,7 @@ extern crate getopts; #[macro_use] extern crate log; -use std::os; +use std::env; use std::old_io; use std::old_io::fs; use std::thunk::Thunk; @@ -48,7 +49,7 @@ pub mod common; pub mod errors; pub fn main() { - let args = os::args(); + let args = env::args().map(|s| s.into_string().unwrap()).collect();; let config = parse_config(args); if config.valgrind_path.is_none() && config.force_valgrind { @@ -224,7 +225,7 @@ pub fn run_tests(config: &Config) { //arm-linux-androideabi debug-info test uses remote debugger //so, we test 1 task at once. // also trying to isolate problems with adb_run_wrapper.sh ilooping - os::setenv("RUST_TEST_TASKS","1"); + env::set_var("RUST_TEST_TASKS","1"); } match config.mode { @@ -232,7 +233,7 @@ pub fn run_tests(config: &Config) { // Some older versions of LLDB seem to have problems with multiple // instances running in parallel, so only run one test task at a // time. - os::setenv("RUST_TEST_TASKS", "1"); + env::set_var("RUST_TEST_TASKS", "1"); } _ => { /* proceed */ } } @@ -245,7 +246,7 @@ pub fn run_tests(config: &Config) { old_io::test::raise_fd_limit(); // Prevent issue #21352 UAC blocking .exe containing 'patch' etc. on Windows // If #11207 is resolved (adding manifest to .exe) this becomes unnecessary - os::setenv("__COMPAT_LAYER", "RunAsInvoker"); + env::set_var("__COMPAT_LAYER", "RunAsInvoker"); let res = test::run_tests_console(&opts, tests.into_iter().collect()); match res { Ok(true) => {} diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 18cb3d1d5b0..5b0ea3b4854 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -31,7 +31,7 @@ use std::old_io::process::ProcessExit; use std::old_io::process; use std::old_io::timer; use std::old_io; -use std::os; +use std::env; use std::iter::repeat; use std::str; use std::string::String; @@ -1298,9 +1298,9 @@ fn make_lib_name(config: &Config, auxfile: &Path, testfile: &Path) -> Path { fn make_exe_name(config: &Config, testfile: &Path) -> Path { let mut f = output_base_name(config, testfile); - if !os::consts::EXE_SUFFIX.is_empty() { + if !env::consts::EXE_SUFFIX.is_empty() { let mut fname = f.filename().unwrap().to_vec(); - fname.extend(os::consts::EXE_SUFFIX.bytes()); + fname.extend(env::consts::EXE_SUFFIX.bytes()); f.set_filename(fname); } f |
