Skip to content

Commit

Permalink
Set LD_LIBRARY_PATH for python tests
Browse files Browse the repository at this point in the history
Point to fake install lib folder.

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed Aug 16, 2021
1 parent 3e9109a commit 2192b29
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,11 @@ if (PYTHONLIBS_FOUND)
add_test(NAME ${test}.py COMMAND
python3 ${CMAKE_SOURCE_DIR}/src/${test}.py)

set(_env_vars)
list(APPEND _env_vars "PYTHONPATH=${FAKE_INSTALL_PREFIX}/lib/python/")
list(APPEND _env_vars "LD_LIBRARY_PATH=${FAKE_INSTALL_PREFIX}/lib:$ENV{LD_LIBRARY_PATH}")
set_tests_properties(${test}.py PROPERTIES
ENVIRONMENT "PYTHONPATH=${FAKE_INSTALL_PREFIX}/lib/python/")
ENVIRONMENT "${_env_vars}")
endforeach()
endif()

Expand Down

0 comments on commit 2192b29

Please sign in to comment.