mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/yaml_loader_parameter_3.3' into 'release/v3.3'
ci: fix Loader parameter in yaml.loader() (3.3) See merge request espressif/esp-idf!15746
This commit is contained in:
commit
cc2e952edb
@ -17,7 +17,7 @@ GITLAB_CONFIG_FILE = os.path.join(os.getenv("IDF_PATH"), ".gitlab-ci.yml")
|
||||
|
||||
def check_artifacts_expire_time():
|
||||
with open(GITLAB_CONFIG_FILE, "r") as f:
|
||||
config = yaml.load(f)
|
||||
config = yaml.load(f, Loader=yaml.Loader)
|
||||
|
||||
errors = []
|
||||
|
||||
|
@ -110,7 +110,7 @@ class UnitTestAssignTest(CIAssignTest.AssignTest):
|
||||
|
||||
try:
|
||||
with open(test_case_path, "r") as f:
|
||||
raw_data = yaml.load(f)
|
||||
raw_data = yaml.load(f, Loader=yaml.Loader)
|
||||
test_cases = raw_data["test cases"]
|
||||
except IOError:
|
||||
print("Test case path is invalid. Should only happen when use @bot to skip unit test.")
|
||||
|
@ -52,7 +52,7 @@ class Config(object):
|
||||
"""
|
||||
try:
|
||||
with open(config_file) as f:
|
||||
configs = yaml.load(f)[env_name]
|
||||
configs = yaml.load(f, Loader=yaml.Loader)[env_name]
|
||||
except (OSError, TypeError, IOError):
|
||||
configs = dict()
|
||||
return configs
|
||||
|
@ -45,7 +45,7 @@ class TestCase(object):
|
||||
"""
|
||||
doc_string = self.test_method.__doc__
|
||||
try:
|
||||
doc = yaml.load(doc_string)
|
||||
doc = yaml.load(doc_string, Loader=yaml.Loader)
|
||||
except (AttributeError, OSError, UnicodeDecodeError):
|
||||
doc = self.DEFAULT_CASE_DOC
|
||||
doc.update(self.test_method.env_args)
|
||||
|
@ -150,7 +150,7 @@ class AssignTest(object):
|
||||
def _parse_gitlab_ci_config(self, ci_config_file):
|
||||
|
||||
with open(ci_config_file, "r") as f:
|
||||
ci_config = yaml.load(f)
|
||||
ci_config = yaml.load(f, Loader=yaml.Loader)
|
||||
|
||||
job_list = list()
|
||||
for job_name in ci_config:
|
||||
|
@ -49,9 +49,9 @@ class Parser(object):
|
||||
self.unit_jobs = {}
|
||||
self.file_name_cache = {}
|
||||
self.idf_path = idf_path
|
||||
self.tag_def = yaml.load(open(os.path.join(idf_path, self.TAG_DEF_FILE), "r"))
|
||||
self.module_map = yaml.load(open(os.path.join(idf_path, self.MODULE_DEF_FILE), "r"))
|
||||
self.config_dependencies = yaml.load(open(os.path.join(idf_path, self.CONFIG_DEPENDENCY_FILE), "r"))
|
||||
self.tag_def = yaml.load(open(os.path.join(idf_path, self.TAG_DEF_FILE), "r"), Loader=yaml.Loader)
|
||||
self.module_map = yaml.load(open(os.path.join(idf_path, self.MODULE_DEF_FILE), "r"), Loader=yaml.Loader)
|
||||
self.config_dependencies = yaml.load(open(os.path.join(idf_path, self.CONFIG_DEPENDENCY_FILE), "r"), Loader=yaml.Loader)
|
||||
# used to check if duplicated test case names
|
||||
self.test_case_names = set()
|
||||
self.parsing_errors = []
|
||||
|
Loading…
Reference in New Issue
Block a user