]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/orchestrator_cli/run-tox.sh
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / pybind / mgr / orchestrator_cli / run-tox.sh
1 #!/usr/bin/env bash
2
3 # run from ./ or from ../
4 : ${MGR_ORCHESTRATOR_CLI_VIRTUALENV:=$CEPH_BUILD_DIR/mgr-orchestrator_cli-virtualenv}
5 : ${WITH_PYTHON2:=ON}
6 : ${WITH_PYTHON3:=ON}
7 : ${CEPH_BUILD_DIR:=$PWD/.tox}
8 test -d orchestrator_cli && cd orchestrator_cli
9
10 if [ -e tox.ini ]; then
11 TOX_PATH=$(readlink -f tox.ini)
12 else
13 TOX_PATH=$(readlink -f $(dirname $0)/tox.ini)
14 fi
15
16 # tox.ini will take care of this.
17 unset PYTHONPATH
18 export CEPH_BUILD_DIR=$CEPH_BUILD_DIR
19
20 if [ -f ${MGR_ORCHESTRATOR_CLI_VIRTUALENV}/bin/activate ]
21 then
22 source ${MGR_ORCHESTRATOR_CLI_VIRTUALENV}/bin/activate
23 fi
24
25 if [ "$WITH_PYTHON2" = "ON" ]; then
26 ENV_LIST+="py27"
27 fi
28 if [ "$WITH_PYTHON3" = "ON" ]; then
29 ENV_LIST+=",py3"
30 fi
31
32 tox -c ${TOX_PATH} -e ${ENV_LIST}