diff options
author | veetaha <[email protected]> | 2020-05-31 03:13:08 +0100 |
---|---|---|
committer | veetaha <[email protected]> | 2020-05-31 03:21:45 +0100 |
commit | d605ec9c321392d9c7ee4b440c560e1e405d92e6 (patch) | |
tree | 58d16996d1d1a05733dcc85ae4efddc563b3d3b1 /crates/rust-analyzer/tests | |
parent | a419cedb1cc661349a022262c8b03993e063252f (diff) |
Change Runnable.bin -> Runnable.kind
As per matklad, we now pass the responsibility for finding the binary to the frontend.
Also, added caching for finding the binary path to reduce
the amount of filesystem interactions.
Diffstat (limited to 'crates/rust-analyzer/tests')
-rw-r--r-- | crates/rust-analyzer/tests/heavy_tests/main.rs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/crates/rust-analyzer/tests/heavy_tests/main.rs b/crates/rust-analyzer/tests/heavy_tests/main.rs index a31580c86..8b473ff74 100644 --- a/crates/rust-analyzer/tests/heavy_tests/main.rs +++ b/crates/rust-analyzer/tests/heavy_tests/main.rs | |||
@@ -58,10 +58,6 @@ use std::collections::Spam; | |||
58 | eprintln!("completion took {:?}", completion_start.elapsed()); | 58 | eprintln!("completion took {:?}", completion_start.elapsed()); |
59 | } | 59 | } |
60 | 60 | ||
61 | fn cargo_path() -> String { | ||
62 | ra_toolchain::cargo().to_str().unwrap().to_owned() | ||
63 | } | ||
64 | |||
65 | #[test] | 61 | #[test] |
66 | fn test_runnables_no_project() { | 62 | fn test_runnables_no_project() { |
67 | if skip_slow_tests() { | 63 | if skip_slow_tests() { |
@@ -83,7 +79,7 @@ fn foo() { | |||
83 | { | 79 | { |
84 | "args": [ "test" ], | 80 | "args": [ "test" ], |
85 | "extraArgs": [ "foo", "--nocapture" ], | 81 | "extraArgs": [ "foo", "--nocapture" ], |
86 | "bin": cargo_path(), | 82 | "kind": "cargo", |
87 | "env": { "RUST_BACKTRACE": "short" }, | 83 | "env": { "RUST_BACKTRACE": "short" }, |
88 | "cwd": null, | 84 | "cwd": null, |
89 | "label": "test foo", | 85 | "label": "test foo", |
@@ -95,7 +91,7 @@ fn foo() { | |||
95 | { | 91 | { |
96 | "args": ["check", "--workspace"], | 92 | "args": ["check", "--workspace"], |
97 | "extraArgs": [], | 93 | "extraArgs": [], |
98 | "bin": cargo_path(), | 94 | "kind": "cargo", |
99 | "env": {}, | 95 | "env": {}, |
100 | "cwd": null, | 96 | "cwd": null, |
101 | "label": "cargo check --workspace", | 97 | "label": "cargo check --workspace", |
@@ -145,7 +141,7 @@ fn main() {} | |||
145 | { | 141 | { |
146 | "args": [ "test", "--package", "foo", "--test", "spam" ], | 142 | "args": [ "test", "--package", "foo", "--test", "spam" ], |
147 | "extraArgs": [ "test_eggs", "--exact", "--nocapture" ], | 143 | "extraArgs": [ "test_eggs", "--exact", "--nocapture" ], |
148 | "bin": cargo_path(), | 144 | "kind": "cargo", |
149 | "env": { "RUST_BACKTRACE": "short" }, | 145 | "env": { "RUST_BACKTRACE": "short" }, |
150 | "label": "test test_eggs", | 146 | "label": "test test_eggs", |
151 | "range": { | 147 | "range": { |
@@ -157,7 +153,7 @@ fn main() {} | |||
157 | { | 153 | { |
158 | "args": [ "check", "--package", "foo" ], | 154 | "args": [ "check", "--package", "foo" ], |
159 | "extraArgs": [], | 155 | "extraArgs": [], |
160 | "bin": cargo_path(), | 156 | "kind": "cargo", |
161 | "env": {}, | 157 | "env": {}, |
162 | "label": "cargo check -p foo", | 158 | "label": "cargo check -p foo", |
163 | "range": { | 159 | "range": { |
@@ -169,7 +165,7 @@ fn main() {} | |||
169 | { | 165 | { |
170 | "args": [ "test", "--package", "foo" ], | 166 | "args": [ "test", "--package", "foo" ], |
171 | "extraArgs": [], | 167 | "extraArgs": [], |
172 | "bin": cargo_path(), | 168 | "kind": "cargo", |
173 | "env": {}, | 169 | "env": {}, |
174 | "label": "cargo test -p foo", | 170 | "label": "cargo test -p foo", |
175 | "range": { | 171 | "range": { |