Copy the test_data/ RLS tests into a writable directory.

See rust-lang-nursery/rls#966 for details.
This commit is contained in:
kennytm 2018-07-29 03:36:18 +08:00
parent 6a2c97c38d
commit a28e3d28aa
No known key found for this signature in database
GPG Key ID: FEF6C8051D0E013C

View File

@ -290,6 +290,13 @@ impl Step for Rls {
"src/tools/rls",
SourceType::Submodule);
// Copy `src/tools/rls/test_data` to a writable drive.
let test_workspace_path = builder.out.join("rls-test-data");
let test_data_path = test_workspace_path.join("test_data");
builder.create_dir(&test_data_path);
builder.cp_r(&builder.src.join("src/tools/rls/test_data"), &test_data_path);
cargo.env("RLS_TEST_WORKSPACE_DIR", test_workspace_path);
builder.add_rustc_lib_path(compiler, &mut cargo);
if try_run(builder, &mut cargo) {