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

testsuite: fix on systems with flux-accounting already installed #467

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

grondo
Copy link
Contributor

@grondo grondo commented Jul 10, 2024

Problem: When flux-accounting is already installed on a system, the sharness tests pull in the installed version of flux-accounting Python modules instead of the test version. This occurs because sharness prepends the source tree Python path to PYTHONPATH, which is then subverted by flux-core's py-runner.py, which prepends the system path in front of that before executing Python subcommands like the accounting service etc.

Use FLUX_PYTHONPATH_PREPEND instead of PYTHONPATH, which is preserved by the py-runner.py wrapper.

Copy link
Member

@cmoussa1 cmoussa1 left a comment

Choose a reason for hiding this comment

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

LGTM! This would probably be good to tag into v0.35.0 as well. Thanks!

@grondo
Copy link
Contributor Author

grondo commented Jul 11, 2024

I'll set MWP. thanks.

Problem: When flux-accounting is already installed on a system, the
sharness tests pull in the installed version of flux-accounting Python
modules instead of the test version. This occurs because sharness
prepends the source tree Python path to PYTHONPATH, which is then
subverted by flux-core's `py-runner.py`, which prepends the system
path in front of that before executing Python subcommands like the
accounting service etc.

Use FLUX_PYTHONPATH_PREPEND instead of PYTHONPATH, which is preserved
by the py-runner.py wrapper.
@grondo grondo force-pushed the t-pythonpath-prepend branch from 6e53b1e to 30c195a Compare July 11, 2024 00:04
@mergify mergify bot merged commit d8f7d35 into flux-framework:master Jul 11, 2024
11 checks passed
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