]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: add python-common to $PYTHONPATH 29525/head
authorKefu Chai <kchai@redhat.com>
Wed, 7 Aug 2019 07:00:09 +0000 (15:00 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 7 Aug 2019 07:00:13 +0000 (15:00 +0800)
fix the regression introduced by 8c50be5df6, so ceph-mgr's python
modules are able to import python-common.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/dashboard/run-backend-api-tests.sh

index 2cc17867617cbfe92c0a26fe836aec16682c76de..8a1dfadfdc43bccd474e672a08bcb7a1244f712b 100755 (executable)
@@ -121,7 +121,8 @@ run_teuthology_tests() {
     export PATH=$BUILD_DIR/bin:$PATH
     source $TEMP_DIR/venv/bin/activate # Run after setting PATH as it does the last PATH export.
     export LD_LIBRARY_PATH=$BUILD_DIR/lib/cython_modules/lib.${CEPH_PY_VERSION_MAJOR}/:$BUILD_DIR/lib
-    export PYTHONPATH=$TEMP_DIR/teuthology:$BUILD_DIR/../qa:$BUILD_DIR/lib/cython_modules/lib.${CEPH_PY_VERSION_MAJOR}/:$BUILD_DIR/../src/pybind
+    local source_dir=$(dirname "$BUILD_DIR")
+    export PYTHONPATH=$TEMP_DIR/teuthology:$source_dir/qa:$BUILD_DIR/lib/cython_modules/lib.${CEPH_PY_VERSION_MAJOR}/:$source_dir/src/pybind:$source_dir/src/python-common
     export RGW=${RGW:-1}
 
     export COVERAGE_ENABLED=true