mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 23:54:33 +02:00
ci: Fix error message if insufficient jobs for test case tag
This commit is contained in:
@@ -46,9 +46,12 @@ import re
|
|||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from yaml import CLoader as Loader
|
from yaml import CLoader
|
||||||
|
has_cloader = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from yaml import Loader as Loader
|
has_cloader = False
|
||||||
|
|
||||||
|
from yaml import Loader
|
||||||
|
|
||||||
from . import CaseConfig, GitlabCIJob, SearchCases, console_log
|
from . import CaseConfig, GitlabCIJob, SearchCases, console_log
|
||||||
|
|
||||||
@@ -180,7 +183,7 @@ class AssignTest(object):
|
|||||||
def _parse_gitlab_ci_config(self, ci_config_file):
|
def _parse_gitlab_ci_config(self, ci_config_file):
|
||||||
|
|
||||||
with open(ci_config_file, 'r') as f:
|
with open(ci_config_file, 'r') as f:
|
||||||
ci_config = yaml.load(f, Loader=Loader)
|
ci_config = yaml.load(f, Loader=CLoader if has_cloader else Loader)
|
||||||
|
|
||||||
job_list = list()
|
job_list = list()
|
||||||
for job_name in ci_config:
|
for job_name in ci_config:
|
||||||
@@ -319,7 +322,7 @@ class AssignTest(object):
|
|||||||
# failures
|
# failures
|
||||||
if failed_to_assign:
|
if failed_to_assign:
|
||||||
console_log('Too many test cases vs jobs to run. '
|
console_log('Too many test cases vs jobs to run. '
|
||||||
'Please increase parallel count in tools/ci/config/target-test.yml '
|
'Please increase parallel count in .gitlab/ci/target-test.yml '
|
||||||
'for jobs with specific tags:', 'R')
|
'for jobs with specific tags:', 'R')
|
||||||
failed_group_count = self._count_groups_by_keys(failed_to_assign)
|
failed_group_count = self._count_groups_by_keys(failed_to_assign)
|
||||||
for tags in failed_group_count:
|
for tags in failed_group_count:
|
||||||
|
Reference in New Issue
Block a user