Skip to content

Commit

Permalink
systemtests: extend PYTHONPATH with python-bareos
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsteffens committed Nov 23, 2020
1 parent 5002ac7 commit 4173dc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
1 change: 1 addition & 0 deletions systemtests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,7 @@ foreach(TEST_NAME ${SYSTEM_TESTS})
string(
CONCAT
pythonpath
"${CMAKE_SOURCE_DIR}/python-bareos:"
"${CMAKE_SOURCE_DIR}/core/src/plugins/filed/python/ldap:"
"${CMAKE_SOURCE_DIR}/core/src/plugins/filed/python/libcloud:"
"${CMAKE_SOURCE_DIR}/core/src/plugins/filed/python/percona-xtrabackup:"
Expand Down
18 changes: 4 additions & 14 deletions systemtests/scripts/functions
Original file line number Diff line number Diff line change
Expand Up @@ -471,20 +471,10 @@ stop_bareos()
run_python_unittests()
{
PYTHON_UNITTEST_SCRIPT=${1:-python-bareos-unittest.py}
if [ "${PROJECT_SOURCE_DIR}" ] && [ -e "${PROJECT_SOURCE_DIR}/../python-bareos/" ]; then
PYTHONPATH=${PYTHONPATH:-}
if [ "$PYTHONPATH" ]; then
export PYTHONPATH=${PROJECT_SOURCE_DIR}/../python-bareos/:$PYTHONPATH
else
export PYTHONPATH=${PROJECT_SOURCE_DIR}/../python-bareos/
fi
PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE:-python}
print_debug "PYTHONPATH=$PYTHONPATH"
if PYTHONRESULT=$($PYTHON_EXECUTABLE "${cwd}/${PYTHON_UNITTEST_SCRIPT}" -v); then
print_debug "$PYTHONRESULT"
else
set_error "$PYTHONRESULT"
fi
if PYTHONRESULT=$($PYTHON_EXECUTABLE "${cwd}/${PYTHON_UNITTEST_SCRIPT}" -v); then
print_debug "$PYTHONRESULT"
else
set_error "$PYTHONRESULT"
fi
}

Expand Down

0 comments on commit 4173dc3

Please sign in to comment.