Skip to content

Commit 332a4cc

Browse files
authored
Rollup merge of #38647 - alexcrichton:faster-android, r=brson
compiletest: Don't limit all suites on Android On Android we only have one test thread for supposed problems with concurrency and the remote debugger. Not all of our suites require one concurrency, however, and suites like compile-fail or pretty can be much faster if they're parallelized on Travis. This commit only sets the test threads to one on Android for suites which actually run code, and other suites aren't tampered with.
2 parents 8b8ab85 + f26e52e commit 332a4cc

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/tools/compiletest/src/main.rs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,24 @@ pub fn run_tests(config: &Config) {
261261
// android debug-info test uses remote debugger
262262
// so, we test 1 thread at once.
263263
// also trying to isolate problems with adb_run_wrapper.sh ilooping
264-
env::set_var("RUST_TEST_THREADS","1");
264+
match config.mode {
265+
// These tests don't actually run code or don't run for android, so
266+
// we don't need to limit ourselves there
267+
Mode::Ui |
268+
Mode::CompileFail |
269+
Mode::ParseFail |
270+
Mode::RunMake |
271+
Mode::Codegen |
272+
Mode::CodegenUnits |
273+
Mode::Pretty |
274+
Mode::Rustdoc |
275+
Mode::Incremental => {}
276+
277+
_ => {
278+
env::set_var("RUST_TEST_THREADS", "1");
279+
}
280+
281+
}
265282
}
266283

267284
match config.mode {

0 commit comments

Comments
 (0)