From a28e3d28aa03f83257122152914abbdbd9bae81c Mon Sep 17 00:00:00 2001 From: kennytm Date: Sun, 29 Jul 2018 03:36:18 +0800 Subject: [PATCH] Copy the test_data/ RLS tests into a writable directory. See rust-lang-nursery/rls#966 for details. --- src/bootstrap/test.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 7c69197885c..24a1dbbde66 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -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) {