Skip to content

More support for filtering out environment vars - #101

Open
nicrowe00 wants to merge 1 commit into
redhat-developer:mainfrom
nicrowe00:env-vars
Open

nicrowe00 wants to merge 1 commit into
redhat-developer:mainfrom
nicrowe00:env-vars

Conversation

@nicrowe00

Copy link
Copy Markdown
Contributor

This adds more support for filtering out environment variables. OPENSSL_CONF was filtered out in a previous PR, ASPNETCORE_URLS and NUGET_PACKAGES are explicity filtered out along with it. Variables beginning with the prefixes "DOTNET_" and "CLR_" are also filtered out, with the option to allow some variables beginning with those prefixes in, like "DOTNET_ROOT".

Closes #51

This adds more support for filtering out environment
variables. OPENSSL_CONF was filtered out in a previous
PR, ASPNETCORE_URLS and NUGET_PACKAGES are explicity filtered
out along with it. Variables beginning with the prefixes "DOTNET_"
and "CLR_" are also filtered out, with the option to allow
some variables beginning with those prefixes in, like "DOTNET_ROOT".
@nicrowe00
nicrowe00 requested review from omajid and tmds September 15, 2026 07:55
@tmds

tmds commented Sep 15, 2026

Copy link
Copy Markdown
Member

Sometimes we will need to apply hacks/workarounds to get the test runner working, such as setting environment variables to control what the .NET runtime does, or what system library is loaded, or whether a library feature like invariant mode is enabled. We wouldn't generally want to pass these to the tests themselves, because we want the tests to run in a pristine environment, unaffected by hacks/workarounds applied to the test runner

Does this hacks/workarounds motivation still apply?

My review feedback: if we're filtering variables, all that gets filtered out should be printed in the runner output because it may be non-obvious to the user of the test runner that they got filtered.

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.

Add support for filtering out environment variables

2 participants