From 7cbc42849f7586d3c567d7ac8f202839f9b968e8 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Thu, 19 Mar 2015 15:42:53 -0400 Subject: [PATCH] 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] --- Makefile.in | 2 +- src/compiletest/compiletest.rs | 4 ++-- src/compiletest/header.rs | 2 +- src/libtest/lib.rs | 6 +++--- src/test/run-fail/test-tasks-invalid-value.rs | 4 ++-- src/test/run-pass/tcp-connect-timeouts.rs | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile.in b/Makefile.in index a760155bbd91a..153092d26f656 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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]. diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index 7fbe772b7f5bd..01c4e99b77c70 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -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 */ } } diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs index 21cebc61b3a9d..6899fa13974e9 100644 --- a/src/compiletest/header.rs +++ b/src/compiletest/header.rs @@ -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() { diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 02ddeea46bfc8..e4ccd49e807ac 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -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(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 = 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(..) => { diff --git a/src/test/run-fail/test-tasks-invalid-value.rs b/src/test/run-fail/test-tasks-invalid-value.rs index 8c9cd2d63cb47..94ed641c79c93 100644 --- a/src/test/run-fail/test-tasks-invalid-value.rs +++ b/src/test/run-fail/test-tasks-invalid-value.rs @@ -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] diff --git a/src/test/run-pass/tcp-connect-timeouts.rs b/src/test/run-pass/tcp-connect-timeouts.rs index d1a3edcfbc529..5462a996f73d9 100644 --- a/src/test/run-pass/tcp-connect-timeouts.rs +++ b/src/test/run-pass/tcp-connect-timeouts.rs @@ -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