Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions scripts/run_tests_in_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@

import testinfra

version_map = {
"3.6": "3.6.15",
"3.7": "3.7.12",
"3.8": "3.8.12",
"3.9": "3.9.9",
"3.10": "3.10.0",
}


def test_run():
host = testinfra.get_host(f"docker://slurmctl")
python = f'python{os.environ.get("PYTHON")}'
host.run(f'pyenv global {version_map[os.environ.get("PYTHON")]}')
Copy link

@junkert junkert Aug 16, 2023

Choose a reason for hiding this comment

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

shouldn't this be host.run(f'pyenv local {version_map[os.environ.get("PYTHON")]}')?

This will cause a change to the system level version of the Python interrupter shim which I doubt is the goal here.

print(host.check_output(f"{python} setup.py build"))
print(host.check_output(f"{python} setup.py install"))
print(host.check_output("./scripts/configure.sh"))
Expand Down