RUST_TEST_TASKS -> RUST_TEST_THREADS

We don't use 'task' anymore, these are now threads.

Because this changes the name of a compiler option, this is

[breaking-change]
This commit is contained in:
Steve Klabnik 2015-03-19 15:42:53 -04:00
parent 08dd30d9eb
commit 7cbc42849f
6 changed files with 10 additions and 10 deletions

View File

@ -97,7 +97,7 @@
# make check-stage1-rpass TESTNAME=my-shiny-new-test
#
# // Having trouble figuring out which test is failing? Turn off parallel tests
# make check-stage1-std RUST_TEST_TASKS=1
# make check-stage1-std RUST_TEST_THREADS=1
#
# This is hardly all there is to know of The Rust Build System's
# mysteries. The tale continues on the wiki[1].

View File

@ -224,7 +224,7 @@ pub fn run_tests(config: &Config) {
// android debug-info test uses remote debugger
// so, we test 1 task at once.
// also trying to isolate problems with adb_run_wrapper.sh ilooping
env::set_var("RUST_TEST_TASKS","1");
env::set_var("RUST_TEST_THREADS","1");
}
match config.mode {
@ -232,7 +232,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.
env::set_var("RUST_TEST_TASKS", "1");
env::set_var("RUST_TEST_THREADS", "1");
}
_ => { /* proceed */ }
}

View File

@ -131,7 +131,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
true
});
for key in vec!["RUST_TEST_NOCAPTURE", "RUST_TEST_TASKS"] {
for key in vec!["RUST_TEST_NOCAPTURE", "RUST_TEST_THREADS"] {
match env::var(key) {
Ok(val) =>
if exec_env.iter().find(|&&(ref x, _)| *x == key.to_string()).is_none() {

View File

@ -338,7 +338,7 @@ The FILTER regex is tested against the name of all tests to run, and
only those tests that match are run.
By default, all tests are run in parallel. This can be altered with the
RUST_TEST_TASKS environment variable when running tests (set it to 1).
RUST_TEST_THRADS environment variable when running tests (set it to 1).
All tests have their standard output and standard error captured by default.
This can be overridden with the --nocapture flag or the RUST_TEST_NOCAPTURE=1
@ -843,12 +843,12 @@ fn run_tests<F>(opts: &TestOpts,
fn get_concurrency() -> uint {
use std::rt;
match env::var("RUST_TEST_TASKS") {
match env::var("RUST_TEST_THREADS") {
Ok(s) => {
let opt_n: Option<uint> = s.parse().ok();
match opt_n {
Some(n) if n > 0 => n,
_ => panic!("RUST_TEST_TASKS is `{}`, should be a positive integer.", s)
_ => panic!("RUST_TEST_THREADS is `{}`, should be a positive integer.", s)
}
}
Err(..) => {

View File

@ -8,12 +8,12 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// This checks that RUST_TEST_TASKS not being 1, 2, ... is detected
// This checks that RUST_TEST_THREADS not being 1, 2, ... is detected
// properly.
// error-pattern:should be a positive integer
// compile-flags: --test
// exec-env:RUST_TEST_TASKS=foo
// exec-env:RUST_TEST_THREADS=foo
// ignore-pretty: does not work well with `--test`
#[test]

View File

@ -10,7 +10,7 @@
// ignore-pretty
// compile-flags:--test
// exec-env:RUST_TEST_TASKS=1
// exec-env:RUST_TEST_THREADS=1
// Tests for the connect_timeout() function on a TcpStream. This runs with only
// one test task to ensure that errors are timeouts, not file descriptor