1 --- a/src/pybind/mgr/ansible/run-tox.sh 2019-04-25 20:15:48.000000000 +0200
2 +++ b/src/pybind/mgr/ansible/run-tox.sh 2019-07-14 16:36:54.220654727 +0200
4 test -d ansible && cd ansible
6 if [ -e tox.ini ]; then
7 - TOX_PATH=$(readlink -f tox.ini)
8 + TOX_PATH="$(readlink -f tox.ini)"
10 - TOX_PATH=$(readlink -f $(dirname $0)/tox.ini)
11 + TOX_PATH="$(readlink -f "$(dirname "$0")"/tox.ini)"
14 # tox.ini will take care of this.
16 export CEPH_BUILD_DIR=$CEPH_BUILD_DIR
18 -source ${MGR_ANSIBLE_VIRTUALENV}/bin/activate
19 +source "${MGR_ANSIBLE_VIRTUALENV}"/bin/activate
21 if [ "$WITH_PYTHON2" = "ON" ]; then
24 -if [ "$WITH_PYTHON3" = "ON" ]; then
25 +if [[ "$WITH_PYTHON3" == "ON" || "$WITH_PYTHON3" == "3" ]]; then
29 -tox -c ${TOX_PATH} -e ${ENV_LIST}
30 +tox -c "${TOX_PATH}" -e "${ENV_LIST}"
31 --- a/src/pybind/mgr/dashboard/run-tox.sh 2019-04-25 20:15:48.000000000 +0200
32 +++ b/src/pybind/mgr/dashboard/run-tox.sh 2019-07-14 16:36:48.907269344 +0200
34 test -d dashboard && cd dashboard
36 if [ -e tox.ini ]; then
37 - TOX_PATH=`readlink -f tox.ini`
38 + TOX_PATH="$(readlink -f tox.ini)"
40 - TOX_PATH=`readlink -f $(dirname $0)/tox.ini`
41 + TOX_PATH="$(readlink -f "$(dirname "$0")"/tox.ini)"
44 # tox.ini will take care of this.
46 export CEPH_BUILD_DIR=$CEPH_BUILD_DIR
48 -source ${MGR_DASHBOARD_VIRTUALENV}/bin/activate
49 +source "${MGR_DASHBOARD_VIRTUALENV}"/bin/activate
51 -if [ "$WITH_PYTHON2" = "ON" ]; then
52 - if [[ -n "$@" ]]; then
53 +if [ "$WITH_PYTHON2" == "ON" ]; then
54 + if [[ -n "$*" ]]; then
57 ENV_LIST+="py27-cov,py27-lint,"
60 -if [ "$WITH_PYTHON3" = "ON" ]; then
61 - if [[ -n "$@" ]]; then
62 +if [[ "$WITH_PYTHON3" == "ON" || "$WITH_PYTHON3" == "3" ]]; then
63 + if [[ -n "$*" ]]; then
66 ENV_LIST+="py3-cov,py3-lint"
70 -tox -c ${TOX_PATH} -e "$ENV_LIST" "$@"
71 +tox -c "${TOX_PATH}" -e "$ENV_LIST" "$@"
72 --- a/src/pybind/mgr/insights/run-tox.sh 2019-04-25 20:15:48.000000000 +0200
73 +++ b/src/pybind/mgr/insights/run-tox.sh 2019-07-14 16:36:41.347195419 +0200
75 test -d insights && cd insights
77 if [ -e tox.ini ]; then
78 - TOX_PATH=`readlink -f tox.ini`
79 + TOX_PATH="$(readlink -f tox.ini)"
81 - TOX_PATH=`readlink -f $(dirname $0)/tox.ini`
82 + TOX_PATH="$(readlink -f "$(dirname "$0")"/tox.ini)"
85 # tox.ini will take care of this.
87 export CEPH_BUILD_DIR=$CEPH_BUILD_DIR
89 -source ${MGR_INSIGHTS_VIRTUALENV}/bin/activate
90 +source "${MGR_INSIGHTS_VIRTUALENV}"/bin/activate
92 if [ "$WITH_PYTHON2" = "ON" ]; then
95 -if [ "$WITH_PYTHON3" = "ON" ]; then
96 +if [[ "$WITH_PYTHON3" == "ON" || "$WITH_PYTHON3" == "3" ]]; then
100 -tox -c ${TOX_PATH} -e ${ENV_LIST}
101 +tox -c "${TOX_PATH}" -e "${ENV_LIST}"
102 --- a/src/pybind/mgr/orchestrator_cli/run-tox.sh 2019-04-25 20:15:48.000000000 +0200
103 +++ b/src/pybind/mgr/orchestrator_cli/run-tox.sh 2019-07-14 16:37:01.734061798 +0200
105 test -d orchestrator_cli && cd orchestrator_cli
107 if [ -e tox.ini ]; then
108 - TOX_PATH=$(readlink -f tox.ini)
109 + TOX_PATH="$(readlink -f tox.ini)"
111 - TOX_PATH=$(readlink -f $(dirname $0)/tox.ini)
112 + TOX_PATH="$(readlink -f "$(dirname "$0")"/tox.ini)"
115 # tox.ini will take care of this.
117 export CEPH_BUILD_DIR=$CEPH_BUILD_DIR
119 -if [ -f ${MGR_ORCHESTRATOR_CLI_VIRTUALENV}/bin/activate ]
121 - source ${MGR_ORCHESTRATOR_CLI_VIRTUALENV}/bin/activate
122 +if [[ -r "${MGR_ORCHESTRATOR_CLI_VIRTUALENV}"/bin/activate ]]; then
123 + source "${MGR_ORCHESTRATOR_CLI_VIRTUALENV}"/bin/activate
126 if [ "$WITH_PYTHON2" = "ON" ]; then
129 -if [ "$WITH_PYTHON3" = "ON" ]; then
131 +if [[ "$WITH_PYTHON3" == "ON" || "$WITH_PYTHON3" == "3" ]]; then
135 -tox -c ${TOX_PATH} -e ${ENV_LIST}
136 +tox -c "${TOX_PATH}" -e "${ENV_LIST}"
137 --- a/src/pybind/mgr/dashboard/tox.ini 2019-04-25 20:15:48.000000000 +0200
138 +++ b/src/pybind/mgr/dashboard/tox.ini 2019-07-15 12:36:39.693948289 +0200
141 -envlist = py27-{cov,lint,run},py3-{cov,lint,run}
142 +envlist = py3-{cov,lint,run}
144 toxworkdir = {env:CEPH_BUILD_DIR}/dashboard
146 @@ -11,13 +11,12 @@ setenv=
147 WEBTEST_INTERACTIVE = false
148 LD_LIBRARY_PATH = {toxinidir}/../../../../build/lib
149 PATH = {toxinidir}/../../../../build/bin:$PATH
150 - py27: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.2
151 py3: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.3
153 cov: COVERAGE_FILE = .coverage.{envname}
155 pip install -r {toxinidir}/requirements.txt
156 - py27: pip install -r {toxinidir}/requirements-py27.txt
157 +; py27: pip install -r {toxinidir}/requirements-py27.txt
158 py3: pip install -r {toxinidir}/requirements-py3.txt
160 cov: {envbindir}/py.test --cov=. --cov-report= --junitxml=junit.{envname}.xml --doctest-modules controllers/rbd.py services/ tests/ tools.py