diff options
author | xudan <xudan16@huawei.com> | 2018-05-04 04:40:06 -0400 |
---|---|---|
committer | xudan <xudan16@huawei.com> | 2018-05-04 04:56:28 -0400 |
commit | 9286e052afe194c400479275edaa2aaf8ed52de8 (patch) | |
tree | d219dcea5132864f490f5e1813d77fc7922a834b | |
parent | 9fb702111ae63824a2e293d327437d0486a565d2 (diff) |
Functest fail to parse refstack results
1. The regular expression can't work well for refstack results
2. Refer to http://testresults.opnfv.org/test/api/v1/results?project=functest&case_name=refstack_defcore&last=1
3. There are 88 success test cases but the list of success is empty
4. Refstack test case name is not always begin with {0}, it maybe any number
5. The test case whose name has the keyword 'fail' will also be list in 'failures'
Change-Id: I5187aaaabdca762256be9162cc85ba42263169bc
Signed-off-by: xudan <xudan16@huawei.com>
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/tempest.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index 13391ca82..d02c114a6 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -217,13 +217,16 @@ class TempestCommon(testcase.TestCase): output = logfile.read() success_testcases = [] - for match in re.findall(r'.*\{0\} (.*?)[. ]*success ', output): + for match in re.findall(r'.*\{\d{1,2}\} (.*?) \.{3} success ', + output): success_testcases.append(match) failed_testcases = [] - for match in re.findall(r'.*\{0\} (.*?)[. ]*fail', output): + for match in re.findall(r'.*\{\d{1,2}\} (.*?) \.{3} fail', + output): failed_testcases.append(match) skipped_testcases = [] - for match in re.findall(r'.*\{0\} (.*?)[. ]*skip:', output): + for match in re.findall(r'.*\{\d{1,2}\} (.*?) \.{3} skip:', + output): skipped_testcases.append(match) self.details = {"tests_number": stat['num_tests'], |