What problem does it solve?
Reproducing a CoreCLR test failure under a specific stress scenario (such as jitstress1 or gcstress0xc) requires the exact environment variables defined in src/tests/Common/testenvironment.proj, and manually translating MSBuild scenario definitions into a CoreRun-consumable .env file is error-prone.
Core Features & Use Cases
- Scenario Resolution: Matches a requested scenario name against TestEnvironment items in testenvironment.proj and evaluates it via the repository's bootstrapped dotnet and the CreateTestEnvFile MSBuild target.
- Shell-to-Dotenv Conversion: Converts generated set/export assignments into CoreRun dotenv syntax, normalizing variable references, quoting, and duplicate names.
- Test Project Merging: Optionally merges a test .csproj's effective CLRTestEnvironmentVariable and target-specific batch/bash environment items in runtime-wrapper precedence order.
- Use Case: A developer investigating a JIT stress failure asks for the environment of a test under gcstress0xc and receives a validated .env file runnable with corerun -e <file> test.dll.
Quick Start
Create an env file for the jitstress1 scenario so I can run my failing CoreCLR test with corerun.