archrelease: copy trunk to community-any
[ArchLinux/community.git] / ceph / trunk / fix-tox-test-commands.patch
blob9e078a246c18b22592aed15a20270b7f39cec874
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
3 @@ -8,22 +8,22 @@
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)"
9 else
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.
15 unset PYTHONPATH
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
22 ENV_LIST+="py27"
24 -if [ "$WITH_PYTHON3" = "ON" ]; then
25 +if [[ "$WITH_PYTHON3" == "ON" || "$WITH_PYTHON3" == "3" ]]; then
26 ENV_LIST+="py3"
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
33 @@ -8,30 +8,30 @@
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)"
39 else
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.
45 unset PYTHONPATH
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
55 ENV_LIST+="py27-run,"
56 else
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
64 ENV_LIST+="py3-run"
65 else
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
74 @@ -8,22 +8,22 @@
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)"
80 else
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.
86 unset PYTHONPATH
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
93 ENV_LIST+="py27"
95 -if [ "$WITH_PYTHON3" = "ON" ]; then
96 +if [[ "$WITH_PYTHON3" == "ON" || "$WITH_PYTHON3" == "3" ]]; then
97 ENV_LIST+="py3"
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
104 @@ -8,25 +8,24 @@
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)"
110 else
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.
116 unset PYTHONPATH
117 export CEPH_BUILD_DIR=$CEPH_BUILD_DIR
119 -if [ -f ${MGR_ORCHESTRATOR_CLI_VIRTUALENV}/bin/activate ]
120 -then
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
127 ENV_LIST+="py27"
129 -if [ "$WITH_PYTHON3" = "ON" ]; then
130 - ENV_LIST+=",py3"
131 +if [[ "$WITH_PYTHON3" == "ON" || "$WITH_PYTHON3" == "3" ]]; then
132 + ENV_LIST+="py3"
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
139 @@ -1,5 +1,5 @@
140 [tox]
141 -envlist = py27-{cov,lint,run},py3-{cov,lint,run}
142 +envlist = py3-{cov,lint,run}
143 skipsdist = true
144 toxworkdir = {env:CEPH_BUILD_DIR}/dashboard
145 minversion = 2.8.1
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
152 cov: UNITTEST = true
153 cov: COVERAGE_FILE = .coverage.{envname}
154 commands=
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
159 cov: coverage erase
160 cov: {envbindir}/py.test --cov=. --cov-report= --junitxml=junit.{envname}.xml --doctest-modules controllers/rbd.py services/ tests/ tools.py