Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit f9fb2ca

Browse files
committed
Use existing $RUSTC if it exists for tests
1 parent 168fcec commit f9fb2ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/harness.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ pub fn expect_messages(results: LsResultList, expected: &[&ExpectedMessage]) {
166166
// Initialise the environment for a test.
167167
pub fn init_env(project_dir: &str) -> (Cache, TestCleanup) {
168168
let _ = env_logger::init();
169-
env::set_var("RUSTC", "rustc");
169+
if env::var("RUSTC").is_err() {
170+
env::set_var("RUSTC", "rustc");
171+
}
170172

171173
let path = &Path::new("test_data").join(project_dir);
172174
let tc = TestCleanup { path: path.to_owned() };

0 commit comments

Comments
 (0)