Merge "Fix baremetal test report" into stable/mitaka
This commit is contained in:
commit
47e6413fea
@ -175,9 +175,20 @@ def get_tests_groups_from_jenkins(runner_name, build_number, distros):
|
|||||||
groups = re.findall(TEST_GROUP_PATTERN, console)
|
groups = re.findall(TEST_GROUP_PATTERN, console)
|
||||||
|
|
||||||
if not groups:
|
if not groups:
|
||||||
logger.error("No test group found in console of the job {0}/{1}"
|
# maybe it's failed baremetal job?
|
||||||
.format(b['jobName'], b['buildNumber']))
|
# because of a design baremetal tests run pre-setup job
|
||||||
continue
|
# and when it fails there are no test groups in common meaning:
|
||||||
|
# groups which could be parsed by TEST_GROUP_PATTERN
|
||||||
|
baremetal_pattern = re.compile(r'Jenkins Build.*jenkins-(.*)-\d+')
|
||||||
|
baremetal_groups = re.findall(baremetal_pattern, console)
|
||||||
|
if not baremetal_groups:
|
||||||
|
logger.error(
|
||||||
|
"No test group found in console of the job {0}/{1}".format
|
||||||
|
(b['jobName'], b['buildNumber']))
|
||||||
|
continue
|
||||||
|
# we should get the group via jobName because the test group name
|
||||||
|
# inside the log could be cut and some symbols will be changed to *
|
||||||
|
groups = b['jobName'].split('.')
|
||||||
# Use the last group (there can be several groups in upgrade jobs)
|
# Use the last group (there can be several groups in upgrade jobs)
|
||||||
test_group = groups[-1]
|
test_group = groups[-1]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user