From a68e2ce14fba98e96368fe7e62c92c17621504dc Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 23 Jan 2019 19:41:18 +0800 Subject: [PATCH] cmake: use $CMAKE_BINARY_DIR for default $CEPH_BUILD_VIRTUALENV 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 (cherry picked from commit a8d6b2170dfa0838dad0d1b7b03fc8cf19e4eeff) Conflicts: - drop the change to mgr/*/run-tox.sh, as they don't exist in luminous. - apply the change to ceph-disk/run-tox.sh - apply the change to ceph-helpers.sh: as it set $PATH using $TMPDIR, which is set to /tmp if $TMPDIR is empty. --- qa/standalone/ceph-helpers.sh | 2 +- src/CMakeLists.txt | 2 +- src/ceph-disk/run-tox.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qa/standalone/ceph-helpers.sh b/qa/standalone/ceph-helpers.sh index 5e1ce6cb9742..c2d724629ccd 100755 --- a/qa/standalone/ceph-helpers.sh +++ b/qa/standalone/ceph-helpers.sh @@ -19,7 +19,7 @@ # TIMEOUT=300 PG_NUM=4 -TMPDIR=${TMPDIR:-/tmp} +TMPDIR=${TMPDIR:-${CEPH_BUILD_DIR}} CEPH_BUILD_VIRTUALENV=${TMPDIR} TESTDIR=${TESTDIR:-${TMPDIR}} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b0837ab1d95c..4ff19154f53b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -742,7 +742,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) diff --git a/src/ceph-disk/run-tox.sh b/src/ceph-disk/run-tox.sh index 76935b9e1f7d..5c51d149a152 100755 --- a/src/ceph-disk/run-tox.sh +++ b/src/ceph-disk/run-tox.sh @@ -16,7 +16,7 @@ # # run from the ceph-disk directory or from its parent -: ${CEPH_DISK_VIRTUALENV:=/tmp/ceph-disk-virtualenv} +: ${CEPH_DISK_VIRTUALENV:=$CEPH_BUILD_DIR/ceph-disk-virtualenv} test -d ceph-disk && cd ceph-disk if [ -e tox.ini ]; then -- 2.47.3