Skip to content
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 support for /tmp/pycore.nnnnn/environment file, DRY up env merges #514

Merged
merged 2 commits into from
Nov 7, 2020

Conversation

siliconja
Copy link
Member

We already support /etc/core/environment (system-wide) and /home/user/.core/environment (user-specific) environments. This adds a 3rd optional environment file: /tmp/pycore.nnnnn/environment.

The use case here is an automated build and testing system that spawns a new session. The code being tested under that system has been build under e.g. myapp/build/usr/local/bin/myappd, so the Python script that is building the session will automatically adjust the LD_SEARCH_PATH and PATH environment variables to reference e.g. myapp/build/usr/local/bin and myapp/build/usr/local/lib.

In this manner, multiple of these test sessions may be running on the system simultaneously testing different builds of the software.

@siliconja siliconja requested a review from bharnden October 2, 2020 16:55
@@ -978,6 +978,15 @@ def runtime_state_hook(self, _state: EventTypes) -> None:
corexmldeployment.CoreXmlDeployment(self, xml_writer.scenario)
xml_writer.write(xml_file_name)

Copy link
Member Author

Choose a reason for hiding this comment

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

the helper below is just to DRY up the code...

@siliconja siliconja changed the base branch from master to develop October 2, 2020 16:57
@bharnden bharnden self-assigned this Oct 2, 2020
@bharnden bharnden merged commit dde74f0 into develop Nov 7, 2020
@bharnden bharnden deleted the feature/add-session-environment-support branch November 7, 2020 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants