From 4d3627e56d333e313b67bbf1e7880b11883b5652 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Sun, 21 Oct 2018 17:03:51 +0200 Subject: Harden Rally generate report MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It converts html_file to str and raises all possible exceptions. It sometimes fails when locally generating reports. Change-Id: Idf6a12aaac4561800cd5e364f8bcc495aabbee1d Signed-off-by: Cédric Ollivier --- functest/opnfv_tests/openstack/tempest/tempest.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'functest/opnfv_tests/openstack/tempest') diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index 910b54615..4d5a0f547 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -314,9 +314,8 @@ class TempestCommon(singlevm.VmReady2): html_file = os.path.join(self.res_dir, "tempest-report.html") cmd = ["rally", "verify", "report", "--type", "html", "--uuid", - self.verification_id, "--to", html_file] - subprocess.Popen(cmd, stdout=subprocess.PIPE, - stderr=subprocess.STDOUT) + self.verification_id, "--to", str(html_file)] + subprocess.check_output(cmd) def update_rally_regex(self, rally_conf='/etc/rally/rally.conf'): """Set image name as tempest img_name_regex""" -- cgit 1.2.3-korg