Skip to content

Use cargo-nextest? #1402

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

Open
madsmtm opened this issue Feb 14, 2025 · 2 comments
Open

Use cargo-nextest? #1402

madsmtm opened this issue Feb 14, 2025 · 2 comments
Assignees

Comments

@madsmtm
Copy link
Collaborator

madsmtm commented Feb 14, 2025

Our test suite is kinda hacky because we really want to test with specific environment variables set, but we cannot easily set those because Cargo tests are run in parallel in different threads.

Using cargo-nextest to run our test suite would solve that issue, since it runs each #[test] in it's own process (but still in parallel), and thus setting an environment variable would not affect other test runs. See also rust-lang/rust#47506 and rust-lang/rust#67650.

WDYT @NobodyXu?

@NobodyXu
Copy link
Collaborator

Yeah it's a really good idea I didn't think of!

Previous I only consider cargo-nextest if performance matters, I forgot that its process model would help isolate tests and would be especially useful for us because our tests sets environment variables

1 similar comment
@NobodyXu
Copy link
Collaborator

Yeah it's a really good idea I didn't think of!

Previous I only consider cargo-nextest if performance matters, I forgot that its process model would help isolate tests and would be especially useful for us because our tests sets environment variables

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

No branches or pull requests

2 participants