]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/insights/run-tox.sh
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / pybind / mgr / insights / run-tox.sh
1 #!/usr/bin/env bash
2
3 # run from ./ or from ../
4 : ${MGR_INSIGHTS_VIRTUALENV:=$CEPH_BUILD_DIR/mgr-insights-virtualenv}
5 : ${WITH_PYTHON2:=ON}
6 : ${WITH_PYTHON3:=ON}
7 : ${CEPH_BUILD_DIR:=$PWD/.tox}
8 test -d insights && cd insights
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 source ${MGR_INSIGHTS_VIRTUALENV}/bin/activate
21
22 if [ "$WITH_PYTHON2" = "ON" ]; then
23 ENV_LIST+="py27"
24 fi
25 if [ "$WITH_PYTHON3" = "ON" ]; then
26 ENV_LIST+="py3"
27 fi
28
29 tox -c ${TOX_PATH} -e ${ENV_LIST}