aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-04-04 10:59:27 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-04-04 10:59:27 +0100
commitb1ac2dfec71ddbff5f3a28f19503811f62157c5e (patch)
tree6107e790eaca45a6bbc0231ea36ab19390296be3
parentc083515eec3db48bb0226d198e7b1af3bc7eef05 (diff)
parent0010d62cad875aac76cad0efd143d4a318e8d2cd (diff)
Merge #1107
1107: Fix test fails when different target directory is used r=matklad a=pcpthm Co-authored-by: pcpthm <[email protected]>
-rw-r--r--crates/ra_batch/src/lib.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_batch/src/lib.rs b/crates/ra_batch/src/lib.rs
index 3bbcdb0b8..5bb47afb2 100644
--- a/crates/ra_batch/src/lib.rs
+++ b/crates/ra_batch/src/lib.rs
@@ -126,10 +126,7 @@ mod tests {
126 126
127 #[test] 127 #[test]
128 fn test_loading_rust_analyzer() { 128 fn test_loading_rust_analyzer() {
129 let mut path = std::env::current_exe().unwrap(); 129 let path = Path::new(env!("CARGO_MANIFEST_DIR")).parent().unwrap().parent().unwrap();
130 while !path.join("Cargo.toml").is_file() {
131 path = path.parent().unwrap().to_owned();
132 }
133 let (db, roots) = BatchDatabase::load_cargo(path).unwrap(); 130 let (db, roots) = BatchDatabase::load_cargo(path).unwrap();
134 let mut n_crates = 0; 131 let mut n_crates = 0;
135 for root in roots { 132 for root in roots {