add some logging remove pypy from tox

we don't support pypy

Change-Id: Ia3f146ebfdb310324fc0b9840b3dca2191918f5f
This commit is contained in:
Eyal 2018-01-14 10:37:48 +02:00
parent ff177fa545
commit 04a49eccfc
2 changed files with 16 additions and 8 deletions

View File

@ -1,6 +1,6 @@
[tox] [tox]
minversion = 2.0 minversion = 2.0
envlist = py34,py27,pypy,pep8 envlist = py34,py27,pep8
skipsdist = True skipsdist = True
[testenv] [testenv]

View File

@ -77,17 +77,25 @@ def run_vitrage_command(command, conf):
LOG.info('Full command: %s', full_command) LOG.info('Full command: %s', full_command)
p = subprocess.Popen(full_command, child = subprocess.Popen(full_command,
shell=True, shell=True,
executable="/bin/bash", executable="/bin/bash",
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE) stderr=subprocess.PIPE)
stdout, stderr = p.communicate()
stdout, stderr = child.communicate()
if stderr: if stderr:
LOG.error('error from command %(command)s = %(error)s', LOG.error('error from command %(command)s = %(error)s',
{'error': stderr, 'command': full_command}) {'error': stderr, 'command': full_command})
return stdout.decode('utf-8') output = stdout.decode('utf-8')
LOG.info('cli stdout: %s', output)
if child.returncode:
LOG.error('process return code is not 0 : return code = %d',
child.returncode)
return output
def get_property_value(environment_name, conf_name, default_value, conf): def get_property_value(environment_name, conf_name, default_value, conf):