ci: fix cleanup_ignore_lists.py on windows

This commit is contained in:
Fu Hanxi 2023-09-21 12:59:09 +02:00
parent ce7848acb3
commit c79c16a73e

View File

@ -6,11 +6,12 @@
import glob
import os
import typing as t
from pathlib import Path
from idf_ci_utils import IDF_PATH
def print_list(_list: t.Iterable[str], title: t.Optional[str] = None) -> None:
def print_list(_list: t.Iterable[t.Any], title: t.Optional[str] = None) -> None:
if not _list:
return
@ -18,15 +19,16 @@ def print_list(_list: t.Iterable[str], title: t.Optional[str] = None) -> None:
print(title)
for i in _list:
print('- ', i)
print('- ', str(i))
if __name__ == '__main__':
os.chdir(IDF_PATH)
ignore_lists = set()
ignore_lists.update(glob.glob('tools/ci/*.txt', recursive=True))
ignore_lists.remove('tools/ci/ignore_build_warnings.txt')
ignore_lists.remove('tools/ci/check_ldgen_mapping_exceptions.txt')
ignore_lists: t.Set[Path] = set()
ignore_lists.update(Path('tools', 'ci').glob('**/*.txt'))
ignore_lists.remove(Path('tools', 'ci', 'ignore_build_warnings.txt'))
ignore_lists.remove(Path('tools', 'ci', 'check_ldgen_mapping_exceptions.txt'))
print_list(ignore_lists, 'Ignore lists:')
updated_files = []