aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests
diff options
context:
space:
mode:
authorJuha Kosonen <juha.kosonen@nokia.com>2017-02-02 12:47:37 +0200
committerJuha Kosonen <juha.kosonen@nokia.com>2017-02-02 13:49:09 +0200
commita5da9f15d7fd4b85fb5a2ca5d376e2a47760df05 (patch)
tree2ef664f715eac91073481e9534ee0f5ab438df1d /functest/opnfv_tests
parente1ae13717c12fad9a09e21e9a7f5ecf5721ec212 (diff)
Add tempest test details to results report
JIRA: FUNCTEST-711 Change-Id: Ib89ad63f0f97ff27e62fd6af200a15b9eed646c6 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
Diffstat (limited to 'functest/opnfv_tests')
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index 17a907e9..9c19a147 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -238,10 +238,23 @@ class TempestCommon(testcase_base.TestcaseBase):
num_success = new_line[2]
elif 'Skipped' in new_line:
num_skipped = new_line[2]
+ elif 'Failures' in new_line:
+ num_failures = new_line[2]
try:
num_executed = int(num_tests) - int(num_skipped)
success_rate = 100 * int(num_success) / int(num_executed)
+ with open(os.path.join(conf_utils.TEMPEST_RESULTS_DIR,
+ "tempest.log"), 'r') as logfile:
+ output = logfile.read()
+
+ error_logs = ""
+ for match in re.findall('(.*?)[. ]*FAILED', output):
+ error_logs += match
+
+ self.details = {"tests": int(num_tests),
+ "failures": int(num_failures),
+ "errors": error_logs}
except Exception:
success_rate = 0