rust/src/Cargo.toml

68 lines
2.1 KiB
TOML
Raw Normal View History

[workspace]
members = [
"bootstrap",
"rustc",
"libstd",
"libtest",
2018-05-08 15:10:16 +02:00
"librustc_codegen_llvm",
"tools/cargotest",
2017-10-20 16:01:30 +02:00
"tools/clippy",
"tools/compiletest",
"tools/error_index_generator",
"tools/linkchecker",
"tools/rustbook",
"tools/unstable-book-gen",
"tools/tidy",
"tools/build-manifest",
travis: Parallelize tests on Android Currently our slowest test suite on android, run-pass, takes over 5 times longer than the x86_64 component (~400 -> ~2200s). Typically QEMU emulation does indeed add overhead, but not 5x for this kind of workload. One of the slowest parts of the Android process is that *compilation* happens serially. Tests themselves need to run single-threaded on the emulator (due to how the test harness works) and this forces the compiles themselves to be single threaded. Now Travis gives us more than one core per machine, so it'd be much better if we could take advantage of them! The emulator itself is still fundamentally single-threaded, but we should see a nice speedup by sending binaries for it to run much more quickly. It turns out that we've already got all the tools to do this in-tree. The qemu-test-{server,client} that are in use for the ARM Linux testing are a perfect match for the Android emulator. This commit migrates the custom adb management code in compiletest/rustbuild to the same qemu-test-{server,client} implementation that ARM Linux uses. This allows us to lift the parallelism restriction on the compiletest test suites, namely run-pass. Consequently although we'll still basically run the tests themselves in single threaded mode we'll be able to compile all of them in parallel, keeping the pipeline much more full and using more cores for the work at hand. Additionally the architecture here should be a bit speedier as it should have less overhead than adb which is a whole new process on both the host and the emulator! Locally on an 8 core machine I've seen the run-pass test suite speed up from taking nearly an hour to only taking 6 minutes. I don't think we'll see quite a drastic speedup on Travis but I'm hoping this change can place the Android tests well below 2 hours instead of just above 2 hours. Because the client/server here are now repurposed for more than just QEMU, they've been renamed to `remote-test-{server,client}`. Note that this PR does not currently modify how debuginfo tests are executed on Android. While parallelizable it wouldn't be quite as easy, so that's left to another day. Thankfully that test suite is much smaller than the run-pass test suite. As a final fix I discovered that the ARM and Android test suites were actually running all library unit tests (e.g. stdtest, coretest, etc) twice. I've corrected that to only run tests once which should also give a nice boost in overall cycle time here.
2017-04-26 17:52:19 +02:00
"tools/remote-test-client",
"tools/remote-test-server",
2017-05-09 00:01:13 +02:00
"tools/rust-installer",
"tools/cargo",
"tools/rustdoc",
"tools/rls",
2017-09-01 07:13:15 +02:00
"tools/rustfmt",
"tools/miri",
2018-02-05 23:43:53 +01:00
"tools/rustdoc-themes",
2017-06-30 20:58:54 +02:00
# FIXME(https://github.com/rust-lang/cargo/issues/4089): move these to exclude
2017-11-21 03:42:22 +01:00
"tools/rls/test_data/bin_lib",
2017-06-30 20:58:54 +02:00
"tools/rls/test_data/borrow_error",
2017-10-07 22:43:07 +02:00
"tools/rls/test_data/common",
2017-11-21 03:42:22 +01:00
"tools/rls/test_data/deglob",
2017-10-20 23:11:50 +02:00
"tools/rls/test_data/features",
2017-06-30 20:58:54 +02:00
"tools/rls/test_data/find_all_refs_no_cfg_test",
2017-08-24 07:52:28 +02:00
"tools/rls/test_data/find_impls",
"tools/rls/test_data/infer_bin",
"tools/rls/test_data/infer_custom_bin",
"tools/rls/test_data/infer_lib",
2017-11-21 03:42:22 +01:00
"tools/rls/test_data/multiple_bins",
"tools/rls/test_data/reformat",
"tools/rls/test_data/reformat_with_range",
2017-09-25 06:13:29 +02:00
"tools/rls/test_data/workspace_symbol",
]
# These options are controlled from our rustc wrapper script, so turn them off
# here and have them controlled elsewhere.
[profile.dev]
debug = false
debug-assertions = false
[profile.test]
debug = false
debug-assertions = false
# We want the RLS to use the version of Cargo that we've got vendored in this
# repository to ensure that the same exact version of Cargo is used by both the
# RLS and the Cargo binary itself. The RLS depends on Cargo as a git repository
# so we use a `[patch]` here to override the github repository with our local
# vendored copy.
[patch."https://github.com/rust-lang/cargo"]
cargo = { path = "tools/cargo" }
2017-09-01 07:13:15 +02:00
[patch."https://github.com/rust-lang-nursery/rustfmt"]
# Similar to Cargo above we want the RLS to use a vendored version of `rustfmt`
# that we're shipping as well (to ensure that the rustfmt in RLS and the
# `rustfmt` executable are the same exact version).
2017-09-01 07:13:15 +02:00
rustfmt-nightly = { path = "tools/rustfmt" }
[patch."https://github.com/rust-lang-nursery/rust-clippy"]
clippy_lints = { path = "tools/clippy/clippy_lints" }