Skip to content

rust: give the basedir env-dep test the environment rustc would see - #2989

Merged
sylvestre merged 1 commit into
mozilla:mainfrom
sylvestre:fix-env-dep-basedir-test
Nov 5, 2026
Merged

sylvestre merged 1 commit into
mozilla:mainfrom
sylvestre:fix-env-dep-basedir-test

Conversation

@sylvestre

Copy link
Copy Markdown
Collaborator

test_hash_env_dep_equal_to_basedir_is_not_unset has failed since c72ff6c, which reuses the dep-info of an earlier run with the same arguments, working directory and environment. The test hashed the same crate twice with the value of Y only in what the mocked rustc reported, with an empty environment both times, so the second hash reused the env-deps of the first.

rustc reports the value of an env-dep from its environment, so give the hasher that environment too.

test_hash_env_dep_equal_to_basedir_is_not_unset has failed since c72ff6c,
which reuses the dep-info of an earlier run with the same arguments, working
directory and environment. The test hashed the same crate twice with the
value of `Y` only in what the mocked rustc reported, with an empty
environment both times, so the second hash reused the env-deps of the first.

rustc reports the value of an env-dep from its environment, so give the
hasher that environment too.
@sylvestre
sylvestre merged commit 951a4ed into mozilla:main Nov 5, 2026
47 checks passed
@codecov-commenter

codecov-commenter commented Nov 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.01%. Comparing base (ba261b8) to head (86dd9cc).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2989       +/-   ##
===========================================
+ Coverage   28.25%   79.01%   +50.75%     
===========================================
  Files          74       74               
  Lines       42128    45840     +3712     
===========================================
+ Hits        11904    36221    +24317     
+ Misses      30224     9619    -20605     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants