mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Speedup heavy tests
We used to skip sysroot, but this logic got bitrotted, reinstalling.
This commit is contained in:
parent
14cc626367
commit
4d14617636
2 changed files with 23 additions and 3 deletions
|
@ -54,6 +54,9 @@ version = "0.0.0"
|
||||||
use std::collections::Spam;
|
use std::collections::Spam;
|
||||||
"#,
|
"#,
|
||||||
)
|
)
|
||||||
|
.with_config(serde_json::json!({
|
||||||
|
"cargo": { "noSysroot": false }
|
||||||
|
}))
|
||||||
.server()
|
.server()
|
||||||
.wait_until_workspace_is_loaded();
|
.wait_until_workspace_is_loaded();
|
||||||
|
|
||||||
|
@ -450,6 +453,9 @@ fn main() {{}}
|
||||||
"#,
|
"#,
|
||||||
librs, libs
|
librs, libs
|
||||||
))
|
))
|
||||||
|
.with_config(serde_json::json!({
|
||||||
|
"cargo": { "noSysroot": false }
|
||||||
|
}))
|
||||||
.server()
|
.server()
|
||||||
.wait_until_workspace_is_loaded();
|
.wait_until_workspace_is_loaded();
|
||||||
|
|
||||||
|
@ -572,7 +578,10 @@ fn main() {
|
||||||
"###,
|
"###,
|
||||||
)
|
)
|
||||||
.with_config(serde_json::json!({
|
.with_config(serde_json::json!({
|
||||||
"cargo": { "loadOutDirsFromCheck": true }
|
"cargo": {
|
||||||
|
"loadOutDirsFromCheck": true,
|
||||||
|
"noSysroot": true,
|
||||||
|
}
|
||||||
}))
|
}))
|
||||||
.server()
|
.server()
|
||||||
.wait_until_workspace_is_loaded();
|
.wait_until_workspace_is_loaded();
|
||||||
|
@ -715,7 +724,10 @@ pub fn foo(_input: TokenStream) -> TokenStream {
|
||||||
"###,
|
"###,
|
||||||
)
|
)
|
||||||
.with_config(serde_json::json!({
|
.with_config(serde_json::json!({
|
||||||
"cargo": { "loadOutDirsFromCheck": true },
|
"cargo": {
|
||||||
|
"loadOutDirsFromCheck": true,
|
||||||
|
"noSysroot": true,
|
||||||
|
},
|
||||||
"procMacro": {
|
"procMacro": {
|
||||||
"enable": true,
|
"enable": true,
|
||||||
"server": PathBuf::from(env!("CARGO_BIN_EXE_rust-analyzer")),
|
"server": PathBuf::from(env!("CARGO_BIN_EXE_rust-analyzer")),
|
||||||
|
|
|
@ -27,7 +27,15 @@ pub(crate) struct Project<'a> {
|
||||||
|
|
||||||
impl<'a> Project<'a> {
|
impl<'a> Project<'a> {
|
||||||
pub(crate) fn with_fixture(fixture: &str) -> Project {
|
pub(crate) fn with_fixture(fixture: &str) -> Project {
|
||||||
Project { fixture, tmp_dir: None, roots: vec![], config: serde_json::Value::Null }
|
Project {
|
||||||
|
fixture,
|
||||||
|
tmp_dir: None,
|
||||||
|
roots: vec![],
|
||||||
|
config: serde_json::json!({
|
||||||
|
// Loading standard library is costly, let's ignore it by default
|
||||||
|
"cargo": { "noSysroot": true }
|
||||||
|
}),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn tmp_dir(mut self, tmp_dir: TestDir) -> Project<'a> {
|
pub(crate) fn tmp_dir(mut self, tmp_dir: TestDir) -> Project<'a> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue