From: Brad Hubbard Date: Tue, 3 Mar 2020 05:58:35 +0000 (+1000) Subject: mgr/run-tox-tests: Fix issue with PYTHONPATH X-Git-Tag: v14.2.10~217^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F33688%2Fhead;p=ceph.git 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 --- 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 .