Support running tests locally in a helix environment on Linux#52713
Support running tests locally in a helix environment on Linux#52713MichaelSimons merged 1 commit intodotnet:mainfrom
Conversation
MichaelSimons
commented
Jan 28, 2026
- Add execute permission to sdk-build-env.sh and RunTestsOnHelix.sh
- Remove the PayloadDirectory metadata from the HelixCorrelationPayload. This is not supported by Helix and is something sdk added. The CreateLocalHelixTestLayout task had a hard dependency on the PayloadDirectory yet is wasn't specified for every HelixCorrelationPayload. The CreateLocalHelixTestLayout was updated to depend on the include metadata instead.
There was a problem hiding this comment.
Pull request overview
This pull request enables running SDK tests locally in a Helix environment by simplifying the payload handling mechanism and ensuring proper script permissions.
Changes:
- Removed the non-standard
PayloadDirectorymetadata fromHelixCorrelationPayloaditems - Updated
CreateLocalHelixTestLayouttask to useItemSpecdirectly instead ofPayloadDirectorymetadata - Added execute permissions to generated
sdk-build-env.shscript
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/UnitTests.proj | Removed PayloadDirectory metadata from all HelixCorrelationPayload items, simplifying the configuration |
| test/HelixTasks/CreateLocalHelixTestLayout.cs | Refactored to use ItemSpec directly, added file/directory handling logic, and improved cleanup behavior |
| eng/restore-toolset.sh | Added chmod +x to ensure the generated build environment script is executable |
| build/RunTestsOnHelix.sh | New script for running tests on Helix in POSIX environments |
edcb8b2 to
8e3f4bc
Compare
| return; | ||
| } | ||
|
|
||
| if (Directory.Exists(target.FullName) == false) |
There was a problem hiding this comment.
Good call here, since Directory.CreateDirectory already works ok if the directory exists.
| " | ||
|
|
||
| echo "$scriptContents" > ${scriptPath} | ||
| chmod +x ${scriptPath} |
There was a problem hiding this comment.
I was initially concerned about this, but I don't think this crosses any trust boundary that isn't already crossable.
There was a problem hiding this comment.
Something isn't working properly in GitHub here...

The .sh files are properly set as text here. Any idea what is going on?
Line 54 in b3dc913
| // Clean the test output directory once at the start | ||
| if (Directory.Exists(TestOutputDirectory)) | ||
| { | ||
| Directory.Delete(TestOutputDirectory, recursive: true); |
There was a problem hiding this comment.
Can this throw if it doesn't have permission (for some reason) or if any of the files are locked?
There was a problem hiding this comment.
Yes, it will throw UnauthorizedAccessException for permissions and IOException if the files are locked.
|
/ba-g known template engine networking issue |
