Skip to content

Commit 757d74a

Browse files
committed
Merge branch 'fix/failing_create_readonly_test_on_win' into 'master'
fix(tools): fixed failing Win CI (tests read_only, cli) Closes IDF-11782 See merge request espressif/esp-idf!35549
2 parents 66abd68 + 5930a42 commit 757d74a

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.gitlab/ci/test-win.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ test_cli_installer_win:
2929
expire_in: 1 week
3030
variables:
3131
IDF_PATH: "$CI_PROJECT_DIR"
32+
timeout: 3h
3233
script:
3334
# Tools must be downloaded for testing
3435
- python ${IDF_PATH}\tools\idf_tools.py download required qemu-riscv32 qemu-xtensa cmake

tools/idf_py_actions/create_ext.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
1+
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
22
# SPDX-License-Identifier: Apache-2.0
33
import os
44
import re
55
import sys
6-
from shutil import copy
6+
from shutil import copyfile
77
from shutil import copytree
88
from typing import Dict
99

@@ -42,7 +42,8 @@ def create_project(target_path: str, name: str) -> None:
4242
copytree(
4343
os.path.join(os.environ['IDF_PATH'], 'tools', 'templates', 'sample_project'),
4444
target_path,
45-
copy_function=copy,
45+
# 'copyfile' ensures only data are copied, without any metadata (file permissions)
46+
copy_function=copyfile,
4647
dirs_exist_ok=True,
4748
)
4849
main_folder = os.path.join(target_path, 'main')
@@ -55,7 +56,8 @@ def create_component(target_path: str, name: str) -> None:
5556
copytree(
5657
os.path.join(os.environ['IDF_PATH'], 'tools', 'templates', 'sample_component'),
5758
target_path,
58-
copy_function=copy,
59+
# 'copyfile' ensures only data are copied, without any metadata (file permissions)
60+
copy_function=copyfile,
5961
dirs_exist_ok=True,
6062
)
6163
os.rename(os.path.join(target_path, 'main.c'), os.path.join(target_path, '.'.join((name, 'c'))))

tools/test_idf_tools/test_idf_tools.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,9 @@ def test_export_with_required_tools_check_skipped(self):
322322

323323
self.run_idf_tools_with_action(['install', OPENOCD])
324324
output = self.run_idf_tools_with_action(['export'])
325-
self.assertIn('%s/tools/openocd-esp32/%s/openocd-esp32/bin' %
326-
(self.temp_tools_dir, OPENOCD_VERSION), output)
325+
self.assertIn(os.path.join(
326+
self.temp_tools_dir, 'tools', 'openocd-esp32', OPENOCD_VERSION, 'openocd-esp32', 'bin'
327+
), output)
327328

328329

329330
# TestUsageUnix tests installed tools on UNIX platforms

0 commit comments

Comments
 (0)