From f60f4c2e61780ce1ed193b16e002457789833b37 Mon Sep 17 00:00:00 2001 From: Brad Hubbard Date: Tue, 3 Mar 2020 15:58:35 +1000 Subject: [PATCH] mgr/run-tox-tests: Fix issue with PYTHONPATH Something changed recently on Bionic which caused tox to fail when PYTHONPATH is a relative path. For some reason the path is mangled by the time it gets to pytest so we need to ensure we are using an absolute path. This seems to be nautilus specific, at least ATM. Signed-off-by: Brad Hubbard --- src/pybind/mgr/ansible/tox.ini | 4 ++-- src/pybind/mgr/dashboard/tox.ini | 4 ++-- src/pybind/mgr/insights/tox.ini | 4 ++-- src/pybind/mgr/orchestrator_cli/tox.ini | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pybind/mgr/ansible/tox.ini b/src/pybind/mgr/ansible/tox.ini index 1df28401be79..ae9888a6d99a 100644 --- a/src/pybind/mgr/ansible/tox.ini +++ b/src/pybind/mgr/ansible/tox.ini @@ -11,8 +11,8 @@ deps = requests-mock setenv= UNITTEST = true - py27: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.2 - py3: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.3 + py27: PYTHONPATH = {env:CEPH_LIB}/cython_modules/lib.2 + py3: PYTHONPATH = {env:CEPH_LIB}/cython_modules/lib.3 commands= {envbindir}/py.test tests/ diff --git a/src/pybind/mgr/dashboard/tox.ini b/src/pybind/mgr/dashboard/tox.ini index 2e0947868015..0c62ceab61ce 100644 --- a/src/pybind/mgr/dashboard/tox.ini +++ b/src/pybind/mgr/dashboard/tox.ini @@ -11,8 +11,8 @@ setenv= WEBTEST_INTERACTIVE = false LD_LIBRARY_PATH = {toxinidir}/../../../../build/lib PATH = {toxinidir}/../../../../build/bin:$PATH - py27: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.2 - py3: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.3 + py27: PYTHONPATH = {env:CEPH_LIB}/cython_modules/lib.2 + py3: PYTHONPATH = {env:CEPH_LIB}/cython_modules/lib.3 cov: UNITTEST = true cov: COVERAGE_FILE = .coverage.{envname} commands= diff --git a/src/pybind/mgr/insights/tox.ini b/src/pybind/mgr/insights/tox.ini index 207e6fb92349..ddb98cea2c34 100644 --- a/src/pybind/mgr/insights/tox.ini +++ b/src/pybind/mgr/insights/tox.ini @@ -10,7 +10,7 @@ deps = mock setenv= UNITTEST = true - py27: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.2 - py3: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.3 + py27: PYTHONPATH = {env:CEPH_LIB}/cython_modules/lib.2 + py3: PYTHONPATH = {env:CEPH_LIB}/cython_modules/lib.3 commands= {envbindir}/py.test tests/ diff --git a/src/pybind/mgr/orchestrator_cli/tox.ini b/src/pybind/mgr/orchestrator_cli/tox.ini index fb3c90e712a0..94dd70ddb62a 100644 --- a/src/pybind/mgr/orchestrator_cli/tox.ini +++ b/src/pybind/mgr/orchestrator_cli/tox.ini @@ -11,8 +11,8 @@ deps = requests-mock setenv= UNITTEST = true - py27: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.2 - py3: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.3 + py27: PYTHONPATH = {env:CEPH_LIB}/cython_modules/lib.2 + py3: PYTHONPATH = {env:CEPH_LIB}/cython_modules/lib.3 commands= {envbindir}/py.test . -- 2.47.3