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

Set the PYTHONPATH for the tests using python #5306

Closed

Conversation

lisajulia
Copy link
Contributor

Add argument 'ENVIRONMENT' to add_test_compareSeparateECLFiles and use it to set the PYTHONPATH for the tests using python

@lisajulia
Copy link
Contributor Author

jenkins build this please

@lisajulia lisajulia added this to the Release 2024.04 milestone Apr 24, 2024
@lisajulia lisajulia force-pushed the fix/pyAction-PYTHONPATH-in-tests branch from 4a55b78 to 20a8f67 Compare April 24, 2024 10:41
@lisajulia
Copy link
Contributor Author

jenkins build this please

@lisajulia
Copy link
Contributor Author

jenkins build this opm-common=4017 please

@lisajulia lisajulia force-pushed the fix/pyAction-PYTHONPATH-in-tests branch from 20a8f67 to fd2daa2 Compare April 24, 2024 15:57
@lisajulia
Copy link
Contributor Author

jenkins build this please

1 similar comment
@lisajulia
Copy link
Contributor Author

jenkins build this please

CMakeLists.txt Outdated

if(opm-common_EMBEDDED_PYTHON)
set_target_properties(flow PROPERTIES
ENVIRONMENT "PYTHONPATH=${PROJECT_BINARY_DIR}/python:${opm-common_DIR}/python:$ENV{PYTHONPATH}")
Copy link
Member

Choose a reason for hiding this comment

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

this makes little sense. you cannot set the environment for an executable, only on a test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, thanks! That explains why that has no effect.. I also tried setting the environment variable in the shell script that execute the failing tests: fd2daa2, but that also did not work

Copy link
Member

Choose a reason for hiding this comment

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

yeah, i just checked it and that code does the intended job at least.

@lisajulia lisajulia force-pushed the fix/pyAction-PYTHONPATH-in-tests branch 2 times, most recently from fd2daa2 to ba88e2c Compare April 25, 2024 14:12
Comment on lines 83 to 84
COMMAND ${PYTHON_EXECUTABLE} "${PYTHON_INSTALL_PY}"
${PROJECT_SOURCE_DIR}/python/opm_embedded ${PROJECT_BINARY_DIR}/python 0
Copy link
Member

Choose a reason for hiding this comment

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

This seems to fail as there is no opm_embedded on my system

@blattms
Copy link
Member

blattms commented Apr 25, 2024

jenkins build this please

…e it to set the PYTHONPATH for the tests using python
@lisajulia lisajulia force-pushed the fix/pyAction-PYTHONPATH-in-tests branch from ba88e2c to 3f5d14d Compare April 26, 2024 05:07
@lisajulia
Copy link
Contributor Author

jenkins build this please

@lisajulia lisajulia removed this from the Release 2024.04 milestone Apr 26, 2024
@lisajulia
Copy link
Contributor Author

The pipeline on OPM/opm-common#4017 actually runs through without this change, closing it

@lisajulia lisajulia closed this Apr 26, 2024
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.

None yet

3 participants