Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variables when running tests #4450

Closed
sazzer opened this issue May 13, 2020 · 6 comments · Fixed by #4448 or #5202
Closed

Environment variables when running tests #4450

sazzer opened this issue May 13, 2020 · 6 comments · Fixed by #4448 or #5202

Comments

@sazzer
Copy link

sazzer commented May 13, 2020

Rust Analyzer makes it really easy to run tests as you're authoring them in the editor - just using the "run test" action above the test name.

However, it would be really useful to be able to specify some environment variables when doing this - in particular, the RUST_LOG environment variable would allow for me to see logging output direct in VSCode when running these tests, whereas right now I need to go and run them in a terminal manually.

Cheers

@vsrs
Copy link
Contributor

vsrs commented May 13, 2020

Implemented in #4448 via a test specific launch.json configuration.

@daxpedda
Copy link
Contributor

daxpedda commented Jul 2, 2020

As far as I understand there is no way to set environment variables for all tests?

@vsrs
Copy link
Contributor

vsrs commented Jul 2, 2020

As far as I understand there is no way to set environment variables for all tests?

Not at the moment. I'll open relevant PR this week.

@daxpedda
Copy link
Contributor

daxpedda commented Jul 2, 2020

Oh wow, thank you!
Should we re-open this issue until then, or should I file a seperate one?

@vsrs
Copy link
Contributor

vsrs commented Jul 2, 2020

Either would be fine with me.

@daxpedda
Copy link
Contributor

daxpedda commented Jul 2, 2020

Let's re-open than, we need a member to do that: @matklad?

@matklad matklad reopened this Jul 2, 2020
@vsrs vsrs mentioned this issue Jul 3, 2020
@bors bors bot closed this as completed in 8489145 Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants