Skip to content

Conversation

@hunger
Copy link
Contributor

@hunger hunger commented Jan 23, 2026

Do not fail pixi-build-rust tests due to some tests suddenly adding sccache support into the outputr.
The root cuase is that one test sets SCCACHE variables to test support for sccache in the builder, which triggers any other test running in parallel to also pick that up.

This PR puts the system environment into the RustBackendConfig, so that tests do not need to mess with a global resource like system variables.

Fixes: #5383

How Has This Been Tested?

By running the tests repeatedly in a 16 core system.

I think this still picks up the environment variables when not using tests, but I admit I did not fully understand where the "real" configuration comes from. The default-constructed configuration will have the current system environment included, so I think it is safe.

AI Disclosure

No AI was harmed during this work.

Checklist:

  • I have performed a self-review of my own code

Do not fail pixi-build-rust tests due to some tests suddenly adding
sccache support into the outputr.
The root cuase is that one test sets SCCACHE variables to test support
for sccache in the builder, which triggers any other test running in
parallel to also pick that up.

This PR puts the system environment into the `RustBackendConfig`, so that
tests do not need to mess with a global resource like system variables.

Fixes: prefix-dev#5383
@hunger hunger requested a review from Hofer-Julian January 23, 2026 15:45
Good idea!

Co-authored-by: Bas Zalmstra <4995967+baszalmstra@users.noreply.github.com>
@Hofer-Julian
Copy link
Contributor

I don't understand how that could lead to problems since cargo nextest is isolated by processes. Did you maybe use cargo test instead?

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 this pull request may close these issues.

pixi_build_rust snapshot tests have sccache configuration added

3 participants