]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: use $CMAKE_BINARY_DIR for default $CEPH_BUILD_VIRTUALENV
authorKefu Chai <kchai@redhat.com>
Wed, 23 Jan 2019 11:41:18 +0000 (19:41 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 27 Jan 2019 06:34:39 +0000 (14:34 +0800)
to avoid conflict with other `make check` runs in the same host

See-also: http://tracker.ceph.com/issues/36737
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/CMakeLists.txt
src/pybind/mgr/ansible/run-tox.sh
src/pybind/mgr/dashboard/run-tox.sh
src/pybind/mgr/insights/run-tox.sh
src/pybind/mgr/orchestrator_cli/run-tox.sh
src/pybind/mgr/test_orchestrator/module.py

index b9507eaaa614b0ef8feb884741c3946f6f311082..d0cc193e97121997381b2945d6404cf7596f8722 100644 (file)
@@ -459,7 +459,7 @@ install(TARGETS librados-config DESTINATION bin)
 # virtualenv base directory for ceph-disk and ceph-detect-init
 set(CEPH_BUILD_VIRTUALENV $ENV{TMPDIR})
 if(NOT CEPH_BUILD_VIRTUALENV)
-  set(CEPH_BUILD_VIRTUALENV /tmp)
+  set(CEPH_BUILD_VIRTUALENV ${CMAKE_BINARY_DIR})
 endif()
 
 add_subdirectory(pybind)
index 951ea23150e7242c1aab02fd82ea3a0e39b36640..88f0f18ee6eb809b1b9ab36f13a3c706b8386978 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 # run from ./ or from ../
-: ${MGR_ANSIBLE_VIRTUALENV:=/tmp/mgr-ansible-virtualenv}
+: ${MGR_ANSIBLE_VIRTUALENV:=$CEPH_BUILD_DIR/mgr-ansible-virtualenv}
 : ${WITH_PYTHON2:=ON}
 : ${WITH_PYTHON3:=ON}
 : ${CEPH_BUILD_DIR:=$PWD/.tox}
index c57f93a4802f3bdb2379ad415012ee6125da48f7..33a7db0cef274d169a5168e2232e9e6ce740046c 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 # run from ./ or from ../
-: ${MGR_DASHBOARD_VIRTUALENV:=/tmp/mgr-dashboard-virtualenv}
+: ${MGR_DASHBOARD_VIRTUALENV:=$CEPH_BUILD_DIR/mgr-dashboard-virtualenv}
 : ${WITH_PYTHON2:=ON}
 : ${WITH_PYTHON3:=ON}
 : ${CEPH_BUILD_DIR:=$PWD/.tox}
index fb7f755142cb010c2aa1c753ad9fa647325b8333..450149910b1ef649ff27ecf590c620b2e3cf60a2 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 # run from ./ or from ../
-: ${MGR_INSIGHTS_VIRTUALENV:=/tmp/mgr-insights-virtualenv}
+: ${MGR_INSIGHTS_VIRTUALENV:=$CEPH_BUILD_DIR/mgr-insights-virtualenv}
 : ${WITH_PYTHON2:=ON}
 : ${WITH_PYTHON3:=ON}
 : ${CEPH_BUILD_DIR:=$PWD/.tox}
index 04d30d6d647e034e0bae952b4b81e6e60bd6c5cc..a7ef70ba384c3687fb8c0f99074a9fc21a9b2a60 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 # run from ./ or from ../
-: ${MGR_ORCHESTRATOR_CLI_VIRTUALENV:=/tmp/mgr-orchestrator_cli-virtualenv}
+: ${MGR_ORCHESTRATOR_CLI_VIRTUALENV:=$CEPH_BUILD_DIR/mgr-orchestrator_cli-virtualenv}
 : ${WITH_PYTHON2:=ON}
 : ${WITH_PYTHON3:=ON}
 : ${CEPH_BUILD_DIR:=$PWD/.tox}
index cbe32695eee4275dc36d86e0f34d9f4c4e21445e..f7707aca2dcd17850af833322d87ac431ac6571b 100644 (file)
@@ -1,5 +1,6 @@
 import json
 import re
+import os
 import threading
 import functools
 import uuid
@@ -196,9 +197,9 @@ class TestOrchestrator(MgrModule, orchestrator.Orchestrator):
             c_v_out = check_output(['ceph-volume', 'inventory', '--format', 'json'])
         except OSError:
             cmd = """
-            . /tmp/ceph-volume-virtualenv/bin/activate
+            . {}/ceph-volume-virtualenv/bin/activate
             ceph-volume inventory --format json
-            """
+            """.format(tmpdir=os.environ.get('TMPDIR', '/tmp'))
             c_v_out = check_output(cmd, shell=True)
 
         for out in c_v_out.splitlines():