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

Clear CARGO_TARGET_DIR for tests. #1482

Merged
merged 1 commit into from
Jun 9, 2019
Merged

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Jun 8, 2019

Setting CARGO_TARGET_DIR=somedir cargo test would cause every test to reuse the same target dir, causing them to stomp on each other's files. This changes it so that CARGO_TARGET_DIR is cleared, and each invocation of rls in the tests will use the target directory in the project where it runs.

Fixes #1466.

@Xanewok
Copy link
Member

Xanewok commented Jun 9, 2019

Yeah that makes a lot of sense now, thanks! I see that's the equivalent of https://github.com/rust-lang/cargo/blob/d5723eb81a5a6755c0da6a2627f18318c031721d/tests/testsuite/support/mod.rs#L1697.
I wonder if we should add a comment about it (or in general similarity of this support code to the one used in Cargo) but let's not block on this and land this now.

@Xanewok Xanewok merged commit 483dcbc into rust-lang:master Jun 9, 2019
Xanewok added a commit to Xanewok/rust that referenced this pull request Jun 9, 2019
This includes rust-lang/rls#1482 which should
finally fix the spurious tests in Rust CI (test-pass -> test-fail).
This was referenced Jun 9, 2019
bors added a commit to rust-lang/rust that referenced this pull request Jun 10, 2019
Update RLS

This includes rust-lang/rls#1482 which should finally fix the spurious tests RLS in Rust CI (test-pass -> test-fail).

r? @oli-obk
cc @ehuss
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

client_changing_workspace_lib_retains_diagnostics fails frequently on slow drives
2 participants