Skip to content

Commit

Permalink
Merge branch 'fix/failing_create_readonly_test_on_win' into 'master'
Browse files Browse the repository at this point in the history
fix(tools): fixed failing Win CI (tests read_only, cli)

Closes IDF-11782

See merge request espressif/esp-idf!35549
  • Loading branch information
dobairoland committed Dec 19, 2024
2 parents 66abd68 + 5930a42 commit 757d74a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitlab/ci/test-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ test_cli_installer_win:
expire_in: 1 week
variables:
IDF_PATH: "$CI_PROJECT_DIR"
timeout: 3h
script:
# Tools must be downloaded for testing
- python ${IDF_PATH}\tools\idf_tools.py download required qemu-riscv32 qemu-xtensa cmake
Expand Down
10 changes: 6 additions & 4 deletions tools/idf_py_actions/create_ext.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
import os
import re
import sys
from shutil import copy
from shutil import copyfile
from shutil import copytree
from typing import Dict

Expand Down Expand Up @@ -42,7 +42,8 @@ def create_project(target_path: str, name: str) -> None:
copytree(
os.path.join(os.environ['IDF_PATH'], 'tools', 'templates', 'sample_project'),
target_path,
copy_function=copy,
# 'copyfile' ensures only data are copied, without any metadata (file permissions)
copy_function=copyfile,
dirs_exist_ok=True,
)
main_folder = os.path.join(target_path, 'main')
Expand All @@ -55,7 +56,8 @@ def create_component(target_path: str, name: str) -> None:
copytree(
os.path.join(os.environ['IDF_PATH'], 'tools', 'templates', 'sample_component'),
target_path,
copy_function=copy,
# 'copyfile' ensures only data are copied, without any metadata (file permissions)
copy_function=copyfile,
dirs_exist_ok=True,
)
os.rename(os.path.join(target_path, 'main.c'), os.path.join(target_path, '.'.join((name, 'c'))))
Expand Down
5 changes: 3 additions & 2 deletions tools/test_idf_tools/test_idf_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,9 @@ def test_export_with_required_tools_check_skipped(self):

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


# TestUsageUnix tests installed tools on UNIX platforms
Expand Down

0 comments on commit 757d74a

Please sign in to comment.