-
Couldn't load subscription status.
- Fork 379
Add DOTNET_CI=true env variable to Apple and Android work item commands #16213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DOTNET_CI=true env variable to Apple and Android work item commands #16213
Conversation
There was a problem hiding this comment.
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 adds the HELIX_WORKITEM_ROOT environment variable to both Android and Apple XHarness work item commands. This enables xUnit's SkipOnCI attribute to function correctly by providing the necessary environment variable that xUnit uses to detect CI execution environments.
Key Changes
- Added
HELIX_WORKITEM_ROOTenvironment variable to Apple work item commands via--set-envparameter - Added
HELIX_WORKITEM_ROOTenvironment variable to Android work item commands via--set-envparameter
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| CreateXHarnessAppleWorkItems.cs | Adds HELIX_WORKITEM_ROOT environment variable to Apple XHarness command construction |
| CreateXHarnessAndroidWorkItems.cs | Adds HELIX_WORKITEM_ROOT environment variable to Android XHarness command construction |
|
Is there a way to test this change in the runtime repository? I confirmed that the variable is relevant in dotnet/runtime#120671 and I would like to verify that this change is correct. |
|
@kotlarmilos possibly you can check the payload scripts of the Helix job sent in this PR and you will see where the envs went to. |
|
Android doesn’t support the |
|
@kotlarmilos alternatively, you could prepend all of the envs by default and then you wouldn't have to come back here once you find you also need the correlation payload path or any of the others |
|
Do you mean a list like this? I prefer being selective and passing only the required env variables instead of all of them. It requires some additional effort, but it gives a better sense of control and visibility over what is being passed. |
I meant more dynamically reading the envs in the payload script and passing that down to the app. Not before creating the job. |
Description
Sets the environment variable used by xUnit to detect if a test is running in a CI environment. This enables the SkipOnCI attribute to work correctly on Apple mobile and Android.
Fixes dotnet/xharness#1473