1.PYTHON_ENABLE=True does not work in bash
The python jobs does not run even we enabled them. The reason is that currently
JJB parse the parameter 'PYTHON_ENABLE' as 'True' which does not work in bash.
Fix it to compare with [Tt]rue.
2.Install tox if it is not installed
3.support only python3.4 in tox.ini
4.install python3-dev
Change-Id: I1a8ebad2fd06fe50ca4f739adb8d6d76caa2963b
Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
.*.sw?
**.log
/docs_build/
.*.sw?
**.log
/docs_build/
function get_installer_ip {
is_set INSTALLER_IP && return
function get_installer_ip {
is_set INSTALLER_IP && return
- INSTALLER_IP=$(get_first_vnic_ip instack)
+ INSTALLER_IP=$(get_first_vnic_ip undercloud)
}
function installer_get_ssh_keys {
}
function installer_get_ssh_keys {
def main():
"""doctor main"""
def main():
"""doctor main"""
- doctor_root_dir = os.path.dirname(os.getcwd())
+ doctor_root_dir = os.path.dirname(sys.path[0])
config_file_dir = '{0}/{1}'.format(doctor_root_dir, 'etc/')
config_files = [join(config_file_dir, f) for f in os.listdir(config_file_dir)
if isfile(join(config_file_dir, f))]
config_file_dir = '{0}/{1}'.format(doctor_root_dir, 'etc/')
config_files = [join(config_file_dir, f) for f in os.listdir(config_file_dir)
if isfile(join(config_file_dir, f))]
+if [[ $PYTHON_ENABLE == [Tt]rue ]]; then
+ which tox || sudo pip install tox
+ if [ -f /usr/bin/apt-get ]; then
+ sudo apt-get install -y python3-dev
+ elif [ -f /usr/bin/yum ] ; then
+ sudo yum install -y python3-devel
+ fi
+
cd $TOP_DIR
echo "executing tox..."
tox
cd $TOP_DIR
echo "executing tox..."
tox
skipsdist = True
[testenv]
skipsdist = True
[testenv]
PROFILER_TYPE
PYTHON_ENABLE
CI_DEBUG
PROFILER_TYPE
PYTHON_ENABLE
CI_DEBUG
changedir = {toxinidir}/tests
commands = python main.py
changedir = {toxinidir}/tests
commands = python main.py