Skip to content

Support environment variables in config.xml#1611

Merged
gregg-miskelly merged 2 commits into
microsoft:mainfrom
gregg-miskelly:CppTestsEnv
Jul 14, 2026
Merged

Support environment variables in config.xml#1611
gregg-miskelly merged 2 commits into
microsoft:mainfrom
gregg-miskelly:CppTestsEnv

Conversation

@gregg-miskelly

Copy link
Copy Markdown
Member

This PR adds support for an Environment dictionary in config.xml to make it easy to configure cygwin tests on Windows.

This PR adds support for an `Environment` dictionary in config.xml to make it easy to configure cygwin tests on Windows.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 EnvironmentVariables dictionary to IDebuggerSettings and propagated it through TestSettings/DebuggerSettings.
  • Implemented parsing of a new <Environment> element in TestSettingsHelper and wired it into debug adapter process launch via DebugAdapterRunner.
  • 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.

Comment thread test/DebuggerTesting/Attribution/TestSettingsHelper.cs
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@gregg-miskelly
gregg-miskelly marked this pull request as ready for review July 14, 2026 15:20
@gregg-miskelly
gregg-miskelly merged commit 8ee6a04 into microsoft:main Jul 14, 2026
6 checks passed
@gregg-miskelly
gregg-miskelly deleted the CppTestsEnv branch July 14, 2026 17:41
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.

3 participants