Support environment variables in config.xml#1611
Merged
Merged
Conversation
This PR adds support for an `Environment` dictionary in config.xml to make it easy to configure cygwin tests on Windows.
There was a problem hiding this comment.
Pull request overview
This PR extends the CppTests configuration pipeline to allow a <Environment> block in config.xml to define additional environment variables that will be applied when launching the debug adapter (useful for Windows MSYS/Cygwin-style setups that need PATH tweaking).
Changes:
- Added an
EnvironmentVariablesdictionary toIDebuggerSettingsand propagated it throughTestSettings/DebuggerSettings. - Implemented parsing of a new
<Environment>element inTestSettingsHelperand wired it into debug adapter process launch viaDebugAdapterRunner. - Updated the MSYS GDB sample configuration to include an (optional)
<Environment>section.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/DebuggerTesting/IDebuggerSettings.cs | Adds EnvironmentVariables to the debugger settings contract. |
| test/DebuggerTesting/Attribution/TestSettingsHelper.cs | Parses <Environment> from config.xml into a dictionary. |
| test/DebuggerTesting/Attribution/TestSettings.cs | Propagates environment variables into DebuggerSettings. |
| test/DebuggerTesting/Attribution/DebuggerSettings.cs | Stores EnvironmentVariables on DebuggerSettings. |
| test/CppTests/TestConfigurations/config_msys_gdb.xml | Adds an example <Environment> section for MSYS GDB. |
| test/CppTests/OpenDebug/CrossPlatCpp/DebuggerRunner.cs | Passes environment variables to DebugAdapterRunner when starting the adapter. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
gregg-miskelly
marked this pull request as ready for review
July 14, 2026 15:20
WardenGnaw
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for an
Environmentdictionary in config.xml to make it easy to configure cygwin tests on Windows.