From 8826afd84e27c0d7b3172d82532a69a05bc0bcd6 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Tue, 27 Aug 2019 10:36:43 +0200 Subject: [PATCH] script/run_tox.sh: Don't overwrite the Ceph's bulid dir Signed-off-by: Sebastian Wagner --- src/script/run_tox.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/script/run_tox.sh b/src/script/run_tox.sh index 14e3e641d94..101f52ced39 100755 --- a/src/script/run_tox.sh +++ b/src/script/run_tox.sh @@ -27,15 +27,15 @@ example: following command will run tox with envlist of "py27,py3" using the "tox.ini" in current directory. - $prog_name --tox-env py27,py3 + $prog_name --tox-envs py27,py3 following command will run tox with envlist of "py27" using "src/pybind/mgr/ansible/tox.ini" - $prog_name --tox-env py27 ansible + $prog_name --tox-envs py27 ansible following command will run tox with envlist of "py27" using "/ceph/src/python-common/tox.ini" - $prog_name --tox-env py27 --tox-path /ceph/src/python-common + $prog_name --tox-envs py27 --tox-path /ceph/src/python-common EOF } @@ -121,6 +121,11 @@ function main() { fi if [ ! -f ${venv_path}/bin/activate ]; then + if [ -d "$venv_path" ]; then + cd $venv_path + echo "$PWD already exists, but it's not a virtualenv. test_name empty?" + exit 1 + fi $source_dir/src/tools/setup-virtualenv.sh ${venv_path} fi source ${venv_path}/bin/activate -- 2.39.5