From a3a0361d0279b17947f5bd51d7c2dd57f50acee1 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Fri, 3 Oct 2025 12:47:01 +0200 Subject: [PATCH 1/2] ci: fix windows test jobs download source --- .gitlab/ci/test-win.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitlab/ci/test-win.yml b/.gitlab/ci/test-win.yml index 5e0a197e063..a3e910ff40c 100644 --- a/.gitlab/ci/test-win.yml +++ b/.gitlab/ci/test-win.yml @@ -14,7 +14,12 @@ - job: upload-submodules-cache optional: true artifacts: false - before_script: [] + variables: + GIT_STRATEGY: fetch # use brew local mirror first + before_script: + - if ($env:IDF_DONT_USE_MIRRORS) { + $env:IDF_MIRROR_PREFIX_MAP = "" + } after_script: [] test_cli_installer_win: From 56e7a118b696e953769e89a05fb43ae894c46467 Mon Sep 17 00:00:00 2001 From: Marek Fiala Date: Tue, 30 Apr 2024 16:42:05 +0200 Subject: [PATCH 2/2] fix(tools): fix failing create readonly project build system test Changed the way of removing copied esp-idf folder. --- tools/test_build_system/test_common.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/tools/test_build_system/test_common.py b/tools/test_build_system/test_common.py index 868d23f6021..1f742984fe5 100644 --- a/tools/test_build_system/test_common.py +++ b/tools/test_build_system/test_common.py @@ -233,27 +233,26 @@ def test_create_project(idf_py: IdfPyFunc, idf_copy: Path) -> None: @pytest.mark.skipif(sys.platform == 'darwin', reason='macos runner is a shell executor, it would break the file system') def test_create_project_with_idf_readonly(idf_copy: Path) -> None: - def change_to_readonly(src: Path) -> None: + def change_file_permissions(src: Path, write_permission: bool) -> None: + dir_permission = 0o777 if write_permission else 0o555 # all or read & execute + file_permission = 0o777 if write_permission else 0o444 # all or readonly or all for root, dirs, files in os.walk(src): for name in dirs: - os.chmod(os.path.join(root, name), 0o555) # read & execute + os.chmod(os.path.join(root, name), dir_permission) for name in files: path = os.path.join(root, name) if '/bin/' in path: continue # skip executables - os.chmod(os.path.join(root, name), 0o444) # readonly + os.chmod(os.path.join(root, name), file_permission) logging.info('Check that command for creating new project will success if the IDF itself is readonly.') - change_to_readonly(idf_copy) + change_file_permissions(idf_copy, write_permission=False) try: run_idf_py('create-project', '--path', str(idf_copy / 'example_proj'), 'temp_test_project') except Exception: raise else: - def del_rw(function, path, excinfo): # type: ignore - os.chmod(path, stat.S_IWRITE) - os.remove(path) - - shutil.rmtree(idf_copy, onerror=del_rw) + change_file_permissions(idf_copy, write_permission=True) + shutil.rmtree(idf_copy) @pytest.mark.usefixtures('test_app_copy')