Skip to content

Forward PYTHONPATH to XHarness iOS script - #6675

Merged
premun merged 3 commits into
dotnet:masterfrom
premun:prvysoky/python-path
Dec 10, 2020
Merged

Forward PYTHONPATH to XHarness iOS script#6675
premun merged 3 commits into
dotnet:masterfrom
premun:prvysoky/python-path

Conversation

@premun

@premun premun commented Dec 10, 2020

Copy link
Copy Markdown
Member

When iOS simulators slow down / freeze up, we detect this, retry the work item and reboot the machine.
Since the iOS payload script is run through launchctl to run in a user session with GUI rendering, we lose some of the env vars on the way so we have to pass them down.

This PR re-initializes the PYTHONPATH variable.

Resolves: dotnet/runtime#45181

Example problem this solves:

+ /usr/local/bin/python3 -c 'from helix.workitemutil import request_infra_retry; request_infra_retry('\''Retrying because iOS Simulator application install hung'\'')'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'helix'
+ /usr/local/bin/python3 -c 'from helix.workitemutil import request_reboot; request_reboot('\''Rebooting because iOS Simulator application install hung '\'')'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'helix'

https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-45839-merge-13b48d1686ba4343b7/Microsoft.Bcl.AsyncInterfaces.Tests/console.fa2f6cc5.log?sv=2019-07-07&se=2020-12-29T16%3A46%3A22Z&sr=c&sp=rl&sig=tn4cgwt0brU45SKlzBlHEbsrbDNIhpZNsqrQkidt7Ss%3D

Comment thread src/Microsoft.DotNet.Helix/Sdk/CreateXHarnessiOSWorkItems.cs Outdated
Co-authored-by: Katya Sokolova <esokolov@microsoft.com>

@MattGal MattGal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Probably won't have to do this to make similar scripts for Windows / Linux as all processes are children of the client there.

@premun
premun merged commit 33c66f3 into dotnet:master Dec 10, 2020
@premun
premun deleted the prvysoky/python-path branch December 10, 2020 17:12
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.

Some iOS tests are failing to launch test app

3 participants