aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/tempest
diff options
context:
space:
mode:
authorCédric Ollivier <ollivier.cedric@gmail.com>2019-05-24 22:08:50 +0200
committerCédric Ollivier <ollivier.cedric@gmail.com>2019-05-24 22:12:04 +0200
commit4b102db86a426d0b56168cb7621e9baa42aeb93b (patch)
tree53f8b8371e906e515df9a79519663cedacf50c48 /functest/opnfv_tests/openstack/tempest
parent0dc9584379c3db46f6cbbbcee0bb9515121d072b (diff)
Decode Bytes in logging calls
It fixes a few incorrect types in log calls [1]. [1] https://build.opnfv.org/ci/view/functest/job/functest-latest-daily/163/ Change-Id: I01790f6454694f434d31366f9c1cf9d98ff5a9cf Signed-off-by: Cédric Ollivier <ollivier.cedric@gmail.com> (cherry picked from commit 7d58f89103a8c44fd166c3e06b492ade63e5c5b3)
Diffstat (limited to 'functest/opnfv_tests/openstack/tempest')
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index 30e9ce60b..69f7c2958 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -142,7 +142,7 @@ class TempestCommon(singlevm.VmReady2):
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
for line in proc.stdout:
- LOGGER.info(line.rstrip())
+ LOGGER.info(line.decode().rstrip())
new_line = line.decode().replace(' ', '').split('|')
if 'Tests' in new_line:
break
@@ -175,7 +175,7 @@ class TempestCommon(singlevm.VmReady2):
'--force']
try:
output = subprocess.check_output(cmd)
- LOGGER.info("%s\n%s", " ".join(cmd), output)
+ LOGGER.info("%s\n%s", " ".join(cmd), output.decode())
except subprocess.CalledProcessError:
pass
@@ -184,7 +184,7 @@ class TempestCommon(singlevm.VmReady2):
'--name', str(getattr(config.CONF, 'tempest_verifier_name')),
'--type', 'tempest', '--system-wide']
output = subprocess.check_output(cmd)
- LOGGER.info("%s\n%s", " ".join(cmd), output)
+ LOGGER.info("%s\n%s", " ".join(cmd), output.decode())
return TempestCommon.get_verifier_id()
@staticmethod
@@ -320,7 +320,7 @@ class TempestCommon(singlevm.VmReady2):
cmd = ['rally', 'verify', 'configure-verifier', '--reconfigure',
'--id', str(getattr(config.CONF, 'tempest_verifier_name'))]
output = subprocess.check_output(cmd)
- LOGGER.info("%s\n%s", " ".join(cmd), output)
+ LOGGER.info("%s\n%s", " ".join(cmd), output.decode())
LOGGER.debug("Looking for tempest.conf file...")
tempest_conf_file = os.path.join(deployment_dir, "tempest.conf")
@@ -347,7 +347,7 @@ class TempestCommon(singlevm.VmReady2):
cmd = "(cd {0}; stestr list '{1}' >{2} 2>/dev/null)".format(
self.verifier_repo_dir, testr_mode, self.list)
output = subprocess.check_output(cmd, shell=True)
- LOGGER.info("%s\n%s", cmd, output)
+ LOGGER.info("%s\n%s", cmd, output.decode())
os.remove('/etc/tempest.conf')
def apply_tempest_blacklist(self):