rust/src/Cargo.toml

73 lines
2.3 KiB
TOML
Raw Normal View History

[workspace]
members = [
"bootstrap",
"rustc",
"libstd",
"libtest",
"tools/cargotest",
2017-10-20 09:01:30 -05: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 10:52:19 -05:00
"tools/remote-test-client",
"tools/remote-test-server",
2017-05-08 17:01:13 -05:00
"tools/rust-installer",
"tools/cargo",
"tools/rustdoc",
"tools/rls",
2017-09-01 00:13:15 -05:00
"tools/rustfmt",
"tools/miri",
2017-06-30 13:58:54 -05:00
# FIXME(https://github.com/rust-lang/cargo/issues/4089): move these to exclude
2017-11-20 20:42:22 -06:00
"tools/rls/test_data/bin_lib",
2017-06-30 13:58:54 -05:00
"tools/rls/test_data/borrow_error",
2017-10-07 15:43:07 -05:00
"tools/rls/test_data/common",
2017-11-20 20:42:22 -06:00
"tools/rls/test_data/deglob",
2017-10-20 16:11:50 -05:00
"tools/rls/test_data/features",
2017-06-30 13:58:54 -05:00
"tools/rls/test_data/find_all_refs_no_cfg_test",
2017-08-24 00:52:28 -05: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-20 20:42:22 -06:00
"tools/rls/test_data/multiple_bins",
"tools/rls/test_data/reformat",
"tools/rls/test_data/reformat_with_range",
2017-09-24 23:13:29 -05:00
"tools/rls/test_data/workspace_symbol",
]
# Curiously, compiletest will segfault if compiled with opt-level=3 on 64-bit
# MSVC when running the compile-fail test suite when a should-fail test panics.
# But hey if this is removed and it gets past the bots, sounds good to me.
[profile.release]
opt-level = 2
[profile.bench]
opt-level = 2
# 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 00:13:15 -05:00
[patch.crates-io]
# 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 vesion). Unlike Cargo, however, the
# RLS depends on `rustfmt` from crates.io, so we put this in a `[patch]` section
# for crates.io
2017-09-01 00:13:15 -05:00
rustfmt-nightly = { path = "tools/rustfmt" }