Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / ceph-detect-init / run-tox.sh
1 #!/bin/bash
2 #
3 # Copyright (C) 2015 SUSE LINUX GmbH
4 # Copyright (C) 2016 <contact@redhat.com>
5 #
6 # Author: Owen Synge <osynge@suse.com>
7 # Author: Loic Dachary <loic@dachary.org>
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU Library Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
12 # any later version.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 # GNU Library Public License for more details.
18 #
19
20 # run from the ceph-detect-init directory or from its parent
21 : ${CEPH_DETECT_INIT_VIRTUALENV:=/tmp/ceph-detect-init-virtualenv}
22 test -d ceph-detect-init && cd ceph-detect-init
23
24 if [ -e tox.ini ]; then
25     TOX_PATH=`readlink -f tox.ini`
26 else
27     TOX_PATH=`readlink -f $(dirname $0)/tox.ini`
28 fi
29
30 source ${CEPH_DETECT_INIT_VIRTUALENV}/bin/activate
31 tox -c ${TOX_PATH}