Skip to content

Commit 7cbc428

Browse files
committed
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]
1 parent 08dd30d commit 7cbc428

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
# make check-stage1-rpass TESTNAME=my-shiny-new-test
9898
#
9999
# // Having trouble figuring out which test is failing? Turn off parallel tests
100-
# make check-stage1-std RUST_TEST_TASKS=1
100+
# make check-stage1-std RUST_TEST_THREADS=1
101101
#
102102
# This is hardly all there is to know of The Rust Build System's
103103
# mysteries. The tale continues on the wiki[1].

src/compiletest/compiletest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,15 +224,15 @@ pub fn run_tests(config: &Config) {
224224
// android debug-info test uses remote debugger
225225
// so, we test 1 task at once.
226226
// also trying to isolate problems with adb_run_wrapper.sh ilooping
227-
env::set_var("RUST_TEST_TASKS","1");
227+
env::set_var("RUST_TEST_THREADS","1");
228228
}
229229

230230
match config.mode {
231231
DebugInfoLldb => {
232232
// Some older versions of LLDB seem to have problems with multiple
233233
// instances running in parallel, so only run one test task at a
234234
// time.
235-
env::set_var("RUST_TEST_TASKS", "1");
235+
env::set_var("RUST_TEST_THREADS", "1");
236236
}
237237
_ => { /* proceed */ }
238238
}

src/compiletest/header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
131131
true
132132
});
133133

134-
for key in vec!["RUST_TEST_NOCAPTURE", "RUST_TEST_TASKS"] {
134+
for key in vec!["RUST_TEST_NOCAPTURE", "RUST_TEST_THREADS"] {
135135
match env::var(key) {
136136
Ok(val) =>
137137
if exec_env.iter().find(|&&(ref x, _)| *x == key.to_string()).is_none() {

src/libtest/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ The FILTER regex is tested against the name of all tests to run, and
338338
only those tests that match are run.
339339
340340
By default, all tests are run in parallel. This can be altered with the
341-
RUST_TEST_TASKS environment variable when running tests (set it to 1).
341+
RUST_TEST_THRADS environment variable when running tests (set it to 1).
342342
343343
All tests have their standard output and standard error captured by default.
344344
This can be overridden with the --nocapture flag or the RUST_TEST_NOCAPTURE=1
@@ -843,12 +843,12 @@ fn run_tests<F>(opts: &TestOpts,
843843

844844
fn get_concurrency() -> uint {
845845
use std::rt;
846-
match env::var("RUST_TEST_TASKS") {
846+
match env::var("RUST_TEST_THREADS") {
847847
Ok(s) => {
848848
let opt_n: Option<uint> = s.parse().ok();
849849
match opt_n {
850850
Some(n) if n > 0 => n,
851-
_ => panic!("RUST_TEST_TASKS is `{}`, should be a positive integer.", s)
851+
_ => panic!("RUST_TEST_THREADS is `{}`, should be a positive integer.", s)
852852
}
853853
}
854854
Err(..) => {

src/test/run-fail/test-tasks-invalid-value.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// This checks that RUST_TEST_TASKS not being 1, 2, ... is detected
11+
// This checks that RUST_TEST_THREADS not being 1, 2, ... is detected
1212
// properly.
1313

1414
// error-pattern:should be a positive integer
1515
// compile-flags: --test
16-
// exec-env:RUST_TEST_TASKS=foo
16+
// exec-env:RUST_TEST_THREADS=foo
1717
// ignore-pretty: does not work well with `--test`
1818

1919
#[test]

src/test/run-pass/tcp-connect-timeouts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// ignore-pretty
1212
// compile-flags:--test
13-
// exec-env:RUST_TEST_TASKS=1
13+
// exec-env:RUST_TEST_THREADS=1
1414

1515
// Tests for the connect_timeout() function on a TcpStream. This runs with only
1616
// one test task to ensure that errors are timeouts, not file descriptor

0 commit comments

Comments
 (0)