idf-build-apps 2.2.2__tar.gz → 2.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/.github/workflows/check-pre-commit.yml +1 -1
  2. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/CHANGELOG.md +20 -0
  3. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/PKG-INFO +1 -1
  4. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/__init__.py +1 -1
  5. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/app.py +12 -0
  6. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/main.py +49 -21
  7. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/pyproject.toml +1 -1
  8. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/setup.py +1 -1
  9. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/tests/test_manifest.py +17 -7
  10. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/.editorconfig +0 -0
  11. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/.git-blame-ignore-revs +0 -0
  12. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/.gitattributes +0 -0
  13. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/.github/dependabot.yml +0 -0
  14. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/.github/workflows/issue_comment.yml +0 -0
  15. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/.github/workflows/new_issues.yml +0 -0
  16. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/.github/workflows/new_prs.yml +0 -0
  17. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/.github/workflows/publish-pypi.yml +0 -0
  18. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/.github/workflows/test-build-docs.yml +0 -0
  19. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/.github/workflows/test-build-idf-apps.yml +0 -0
  20. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/.gitignore +0 -0
  21. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/.pre-commit-config.yaml +0 -0
  22. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/.readthedocs.yml +0 -0
  23. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/CONTRIBUTING.md +0 -0
  24. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/LICENSE +0 -0
  25. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/README.md +0 -0
  26. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/docs/CHANGELOG.md +0 -0
  27. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/docs/CONTRIBUTING.md +0 -0
  28. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/docs/Makefile +0 -0
  29. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/docs/_apidoc_templates/module.rst_t +0 -0
  30. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/docs/_apidoc_templates/package.rst_t +0 -0
  31. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/docs/_apidoc_templates/toc.rst_t +0 -0
  32. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/docs/_static/espressif-logo.svg +0 -0
  33. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/docs/_static/theme_overrides.css +0 -0
  34. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/docs/_templates/layout.html +0 -0
  35. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/docs/cli.rst +0 -0
  36. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/docs/conf.py +0 -0
  37. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/docs/config_file.md +0 -0
  38. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/docs/find_build.md +0 -0
  39. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/docs/index.rst +0 -0
  40. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/docs/manifest.md +0 -0
  41. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/docs/migration/1.x_to_2.x.md +0 -0
  42. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/__main__.py +0 -0
  43. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/build_apps_args.py +0 -0
  44. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/config.py +0 -0
  45. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/constants.py +0 -0
  46. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/finder.py +0 -0
  47. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/junit/__init__.py +0 -0
  48. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/junit/report.py +0 -0
  49. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/junit/utils.py +0 -0
  50. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/log.py +0 -0
  51. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/manifest/__init__.py +0 -0
  52. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/manifest/if_parser.py +0 -0
  53. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/manifest/manifest.py +0 -0
  54. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/manifest/soc_header.py +0 -0
  55. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/session_args.py +0 -0
  56. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/utils.py +0 -0
  57. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/yaml/__init__.py +0 -0
  58. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/idf_build_apps/yaml/parser.py +0 -0
  59. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/license_header.txt +0 -0
  60. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/tests/conftest.py +0 -0
  61. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/tests/test_app.py +0 -0
  62. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/tests/test_build.py +0 -0
  63. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/tests/test_finder.py +0 -0
  64. {idf_build_apps-2.2.2 → idf_build_apps-2.3.1}/tests/test_utils.py +0 -0
@@ -12,7 +12,7 @@ jobs:
12
12
  fetch-depth: 0
13
13
  - uses: actions/setup-python@v5
14
14
  - id: changed-files
15
- uses: tj-actions/changed-files@v42
15
+ uses: tj-actions/changed-files@v44
16
16
  - uses: pre-commit/action@v3.0.1
17
17
  with:
18
18
  extra_args: --files ${{ steps.changed-files.outputs.all_changed_files }}
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## v2.3.1 (2024-04-22)
6
+
7
+ ### Fix
8
+
9
+ - copy sdkconfig file while `_post_build` instead of the final phase of `build_apps`
10
+
11
+ ## v2.3.0 (2024-03-20)
12
+
13
+ ### Feat
14
+
15
+ - support ignore app dependencies by components
16
+
5
17
  ## v2.2.2 (2024-03-13)
6
18
 
7
19
  ### Fix
@@ -101,6 +113,14 @@ Here are the breaking changes:
101
113
  - remove `LOGGER` from `idf_build_apps`, use `logging.getLogger('idf_build_apps')` instead
102
114
  - rename `build_job.py` to `build_apps_args.py`, `BuildAppJob` to `BuildAppsArgs`
103
115
 
116
+ ## v1.1.5 (2024-03-20)
117
+
118
+ ### Fix
119
+
120
+ - python 2.7 old class
121
+ - search sdkconfig path
122
+ - improve error message when env var IDF_PATH not set
123
+
104
124
  ## v1.1.4 (2023-12-29)
105
125
 
106
126
  ### Fix
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: idf-build-apps
3
- Version: 2.2.2
3
+ Version: 2.3.1
4
4
  Summary: Tools for building ESP-IDF related apps.
5
5
  Author-email: Fu Hanxi <fuhanxi@espressif.com>
6
6
  Requires-Python: >=3.7
@@ -8,7 +8,7 @@ Tools for building ESP-IDF related apps.
8
8
  # ruff: noqa: E402
9
9
  # avoid circular imports
10
10
 
11
- __version__ = '2.2.2'
11
+ __version__ = '2.3.1'
12
12
 
13
13
  from .session_args import (
14
14
  SessionArgs,
@@ -124,6 +124,7 @@ class App(BaseModel):
124
124
  verbose: bool = False
125
125
  check_warnings: bool = False
126
126
  preserve: bool = True
127
+ copy_sdkconfig: bool = False
127
128
 
128
129
  # build_apps() related
129
130
  build_apps_args: t.Optional[BuildAppsArgs] = None
@@ -561,6 +562,17 @@ class App(BaseModel):
561
562
  def _post_build(self) -> None:
562
563
  self._build_stage = BuildStage.POST_BUILD
563
564
 
565
+ if self.copy_sdkconfig:
566
+ try:
567
+ shutil.copy(
568
+ os.path.join(self.work_dir, 'sdkconfig'),
569
+ os.path.join(self.build_path, 'sdkconfig'),
570
+ )
571
+ except Exception as e:
572
+ self._logger.warning('Copy sdkconfig file from failed: %s', e)
573
+ else:
574
+ self._logger.debug('Copied sdkconfig file from %s to %s', self.work_dir, self.build_path)
575
+
564
576
  if not os.path.isfile(self.build_log_path):
565
577
  return
566
578
 
@@ -6,7 +6,6 @@ import json
6
6
  import logging
7
7
  import os
8
8
  import re
9
- import shutil
10
9
  import sys
11
10
  import textwrap
12
11
  import typing as t
@@ -66,12 +65,26 @@ def _check_app_dependency(
66
65
  manifest_rootpath: t.Optional[str] = None,
67
66
  modified_components: t.Optional[t.List[str]] = None,
68
67
  modified_files: t.Optional[t.List[str]] = None,
68
+ ignore_app_dependencies_components: t.Optional[t.List[str]] = None,
69
69
  ignore_app_dependencies_filepatterns: t.Optional[t.List[str]] = None,
70
70
  ) -> bool:
71
71
  # not check since modified_components and modified_files are not passed
72
72
  if modified_components is None and modified_files is None:
73
73
  return False
74
74
 
75
+ # not check since ignore_app_dependencies_components is passed and matched
76
+ if (
77
+ ignore_app_dependencies_components
78
+ and modified_components is not None
79
+ and set(modified_components).intersection(ignore_app_dependencies_components)
80
+ ):
81
+ LOGGER.info(
82
+ 'Build all apps since modified components %s matches ignored components %s',
83
+ ', '.join(modified_components),
84
+ ', '.join(ignore_app_dependencies_components),
85
+ )
86
+ return False
87
+
75
88
  # not check since ignore_app_dependencies_filepatterns is passed and matched
76
89
  if (
77
90
  ignore_app_dependencies_filepatterns
@@ -79,7 +92,7 @@ def _check_app_dependency(
79
92
  and files_matches_patterns(modified_files, ignore_app_dependencies_filepatterns, manifest_rootpath)
80
93
  ):
81
94
  LOGGER.info(
82
- 'Build all apps since patterns %s matches modified files %s',
95
+ 'Build all apps since modified files %s matches ignored file patterns %s',
83
96
  ', '.join(modified_files),
84
97
  ', '.join(ignore_app_dependencies_filepatterns),
85
98
  )
@@ -108,6 +121,7 @@ def find_apps(
108
121
  default_build_targets: t.Optional[t.Union[t.List[str], str]] = None,
109
122
  modified_components: t.Optional[t.Union[t.List[str], str]] = None,
110
123
  modified_files: t.Optional[t.Union[t.List[str], str]] = None,
124
+ ignore_app_dependencies_components: t.Optional[t.Union[t.List[str], str]] = None,
111
125
  ignore_app_dependencies_filepatterns: t.Optional[t.Union[t.List[str], str]] = None,
112
126
  sdkconfig_defaults: t.Optional[str] = None,
113
127
  include_skipped_apps: bool = False,
@@ -137,8 +151,8 @@ def find_apps(
137
151
  :param default_build_targets: default build targets used in manifest files
138
152
  :param modified_components: modified components
139
153
  :param modified_files: modified files
140
- :param ignore_app_dependencies_filepatterns: file patterns that used for ignoring checking the component
141
- dependencies
154
+ :param ignore_app_dependencies_components: components used for ignoring checking the app dependencies
155
+ :param ignore_app_dependencies_filepatterns: file patterns used for ignoring checking the app dependencies
142
156
  :param sdkconfig_defaults: semicolon-separated string, pass to idf.py -DSDKCONFIG_DEFAULTS if specified,
143
157
  also could be set via environment variables "SDKCONFIG_DEFAULTS"
144
158
  :param include_skipped_apps: include skipped apps or not
@@ -168,6 +182,7 @@ def find_apps(
168
182
 
169
183
  modified_components = to_list(modified_components)
170
184
  modified_files = to_list(modified_files)
185
+ ignore_app_dependencies_components = to_list(ignore_app_dependencies_components)
171
186
  ignore_app_dependencies_filepatterns = to_list(ignore_app_dependencies_filepatterns)
172
187
  config_rules_str = to_list(config_rules_str)
173
188
 
@@ -199,6 +214,7 @@ def find_apps(
199
214
  manifest_rootpath=manifest_rootpath,
200
215
  modified_components=modified_components,
201
216
  modified_files=modified_files,
217
+ ignore_app_dependencies_components=ignore_app_dependencies_components,
202
218
  ignore_app_dependencies_filepatterns=ignore_app_dependencies_filepatterns,
203
219
  ),
204
220
  modified_components=modified_components,
@@ -225,6 +241,7 @@ def build_apps(
225
241
  manifest_rootpath: t.Optional[str] = None,
226
242
  modified_components: t.Optional[t.Union[t.List[str], str]] = None,
227
243
  modified_files: t.Optional[t.Union[t.List[str], str]] = None,
244
+ ignore_app_dependencies_components: t.Optional[t.Union[t.List[str], str]] = None,
228
245
  ignore_app_dependencies_filepatterns: t.Optional[t.Union[t.List[str], str]] = None,
229
246
  check_app_dependencies: t.Optional[bool] = None,
230
247
  # BuildAppsArgs
@@ -249,8 +266,8 @@ def build_apps(
249
266
  are relative paths. Use the current directory if not specified
250
267
  :param modified_components: modified components
251
268
  :param modified_files: modified files
252
- :param ignore_app_dependencies_filepatterns: file patterns that used for ignoring checking the component
253
- dependencies
269
+ :param ignore_app_dependencies_components: components used for ignoring checking the app dependencies
270
+ :param ignore_app_dependencies_filepatterns: file patterns used for ignoring checking the app dependencies
254
271
  :param check_app_dependencies: check app dependencies or not. if not set, will be calculated by modified_components,
255
272
  modified_files, and ignore_app_dependencies_filepatterns
256
273
  :param parallel_count: number of parallel tasks to run
@@ -263,6 +280,7 @@ def build_apps(
263
280
  apps = to_list(apps)
264
281
  modified_components = to_list(modified_components)
265
282
  modified_files = to_list(modified_files)
283
+ ignore_app_dependencies_components = to_list(ignore_app_dependencies_components)
266
284
  ignore_app_dependencies_filepatterns = to_list(ignore_app_dependencies_filepatterns)
267
285
 
268
286
  test_suite = TestSuite('build_apps')
@@ -305,6 +323,7 @@ def build_apps(
305
323
  app.dry_run = dry_run
306
324
  app.index = index
307
325
  app.verbose = build_verbose
326
+ app.copy_sdkconfig = copy_sdkconfig
308
327
 
309
328
  LOGGER.info('(%s/%s) Building app: %s', index, len(apps), app)
310
329
 
@@ -313,7 +332,11 @@ def build_apps(
313
332
  modified_components=modified_components,
314
333
  modified_files=modified_files,
315
334
  check_app_dependencies=_check_app_dependency(
316
- manifest_rootpath, modified_components, modified_files, ignore_app_dependencies_filepatterns
335
+ manifest_rootpath=manifest_rootpath,
336
+ modified_components=modified_components,
337
+ modified_files=modified_files,
338
+ ignore_app_dependencies_components=ignore_app_dependencies_components,
339
+ ignore_app_dependencies_filepatterns=ignore_app_dependencies_filepatterns,
317
340
  )
318
341
  if check_app_dependencies is None
319
342
  else check_app_dependencies,
@@ -330,17 +353,6 @@ def build_apps(
330
353
  fw.write(app.to_json() + '\n')
331
354
  LOGGER.debug('Recorded app info in %s', build_apps_args.collect_app_info)
332
355
 
333
- if copy_sdkconfig:
334
- try:
335
- shutil.copy(
336
- os.path.join(app.work_dir, 'sdkconfig'),
337
- os.path.join(app.build_path, 'sdkconfig'),
338
- )
339
- except Exception as e:
340
- LOGGER.warning('Copy sdkconfig file from failed: %s', e)
341
- else:
342
- LOGGER.debug('Copied sdkconfig file from %s to %s', app.work_dir, app.build_path)
343
-
344
356
  if app.build_status == BuildStatus.FAILED:
345
357
  if not keep_going:
346
358
  return 1
@@ -563,6 +575,18 @@ def get_parser() -> argparse.ArgumentParser:
563
575
  'If set to "", the value would be considered as None. '
564
576
  'If set to ";", the value would be considered as an empty list',
565
577
  )
578
+ common_args.add_argument(
579
+ '-ic',
580
+ '--ignore-app-dependencies-components',
581
+ type=semicolon_separated_str_to_list,
582
+ help='semicolon-separated string which specifies the modified components used for '
583
+ 'ignoring checking the app dependencies. '
584
+ 'The `depends_components` and `depends_filepatterns` set in the manifest files will be ignored when any of the '
585
+ 'specified components matches any of the modified components. '
586
+ 'Must be used together with --modified-components. '
587
+ 'If set to "", the value would be considered as None. '
588
+ 'If set to ";", the value would be considered as an empty list',
589
+ )
566
590
  common_args.add_argument(
567
591
  '-if',
568
592
  '--ignore-app-dependencies-filepatterns',
@@ -683,11 +707,13 @@ def validate_args(parser: argparse.ArgumentParser, args: argparse.Namespace) ->
683
707
  default_build_targets.append(target)
684
708
  args.default_build_targets = default_build_targets
685
709
 
710
+ if args.ignore_app_dependencies_components is not None:
711
+ if args.modified_components is None:
712
+ raise InvalidCommand('Must specify "--ignore-app-dependencies-components" with "--modified-components", ')
713
+
686
714
  if args.ignore_app_dependencies_filepatterns is not None:
687
715
  if args.modified_files is None:
688
- raise InvalidCommand(
689
- 'Must specify "--ignore-component-dependencies-file-patterns" with "--modified-files", '
690
- )
716
+ raise InvalidCommand('Must specify "--ignore-app-dependencies-filepatterns" with "--modified-files", ')
691
717
 
692
718
 
693
719
  def apply_config_args(args: argparse.Namespace) -> None:
@@ -731,6 +757,7 @@ def main():
731
757
  default_build_targets=args.default_build_targets,
732
758
  modified_components=args.modified_components,
733
759
  modified_files=args.modified_files,
760
+ ignore_app_dependencies_components=args.ignore_app_dependencies_components,
734
761
  ignore_app_dependencies_filepatterns=args.ignore_app_dependencies_filepatterns,
735
762
  sdkconfig_defaults=args.sdkconfig_defaults,
736
763
  )
@@ -766,6 +793,7 @@ def main():
766
793
  manifest_rootpath=args.manifest_rootpath,
767
794
  modified_components=args.modified_components,
768
795
  modified_files=args.modified_files,
796
+ ignore_app_dependencies_components=args.ignore_app_dependencies_components,
769
797
  ignore_app_dependencies_filepatterns=args.ignore_app_dependencies_filepatterns,
770
798
  junitxml=args.junitxml,
771
799
  )
@@ -60,7 +60,7 @@ idf-build-apps = "idf_build_apps:main.main"
60
60
 
61
61
  [tool.commitizen]
62
62
  name = "cz_conventional_commits"
63
- version = "2.2.2"
63
+ version = "2.3.1"
64
64
  tag_format = "v$version"
65
65
  version_files = [
66
66
  "idf_build_apps/__init__.py",
@@ -30,7 +30,7 @@ entry_points = \
30
30
  {'console_scripts': ['idf-build-apps = idf_build_apps:main.main']}
31
31
 
32
32
  setup(name='idf-build-apps',
33
- version='2.2.2',
33
+ version='2.3.1',
34
34
  description='Tools for building ESP-IDF related apps.',
35
35
  author=None,
36
36
  author_email='Fu Hanxi <fuhanxi@espressif.com>',
@@ -122,7 +122,8 @@ test5:
122
122
 
123
123
  os.chdir(tmpdir)
124
124
  Manifest.ROOTPATH = tmpdir
125
- manifest = Manifest.from_file(yaml_file)
125
+ with pytest.warns(UserWarning, match='Folder ".+" does not exist. Please check your manifest file'):
126
+ manifest = Manifest.from_file(yaml_file)
126
127
 
127
128
  assert manifest.depends_components('test1', None, None) == ['VVV']
128
129
  assert manifest.depends_components('test1', None, 'AAA') == ['VVV']
@@ -175,7 +176,8 @@ test1:
175
176
  )
176
177
  os.chdir(tmpdir)
177
178
  Manifest.ROOTPATH = tmpdir
178
- manifest = Manifest.from_file(yaml_file)
179
+ with pytest.warns(UserWarning, match='Folder ".+" does not exist. Please check your manifest file'):
180
+ manifest = Manifest.from_file(yaml_file)
179
181
 
180
182
  assert manifest.depends_components('test1', None, None) == ['DF']
181
183
  assert manifest.depends_components('test1', None, 'CCC') == ['DF']
@@ -202,7 +204,8 @@ def test_manifest_switch_clause_wrong_manifest_format(tmpdir):
202
204
  encoding='utf8',
203
205
  )
204
206
  try:
205
- Manifest.from_file(yaml_file)
207
+ with pytest.warns(UserWarning, match='Folder ".+" does not exist. Please check your manifest file'):
208
+ Manifest.from_file(yaml_file)
206
209
  except InvalidManifest as e:
207
210
  assert str(e) == "Only the 'if' and 'default' keywords are supported in switch clause."
208
211
 
@@ -219,7 +222,8 @@ def test_manifest_switch_clause_wrong_manifest_format(tmpdir):
219
222
  encoding='utf8',
220
223
  )
221
224
  try:
222
- Manifest.from_file(yaml_file)
225
+ with pytest.warns(UserWarning, match='Folder ".+" does not exist. Please check your manifest file'):
226
+ Manifest.from_file(yaml_file)
223
227
  except InvalidManifest as e:
224
228
  assert str(e) == 'Current manifest format has to fit either the switch format or the list format.'
225
229
 
@@ -260,7 +264,9 @@ foo:
260
264
  """,
261
265
  encoding='utf8',
262
266
  )
263
- manifest = Manifest.from_file(yaml_file)
267
+ with pytest.warns(UserWarning, match='Folder ".+" does not exist. Please check your manifest file'):
268
+ manifest = Manifest.from_file(yaml_file)
269
+
264
270
  assert manifest.enable_build_targets('foo') == sorted(SUPPORTED_TARGETS)
265
271
 
266
272
  yaml_file.write_text(
@@ -281,7 +287,9 @@ examples/wifi/coexist:
281
287
  encoding='utf8',
282
288
  )
283
289
 
284
- manifest = Manifest.from_file(yaml_file)
290
+ with pytest.warns(UserWarning, match='Folder ".+" does not exist. Please check your manifest file'):
291
+ manifest = Manifest.from_file(yaml_file)
292
+
285
293
  assert manifest.depends_components('examples/wifi/coexist') == ['esp_coex', 'esp_hw_support', 'esp_wifi']
286
294
 
287
295
  yaml_file.write_text(
@@ -428,7 +436,9 @@ examples/wifi/coexist:
428
436
  encoding='utf8',
429
437
  )
430
438
 
431
- manifest = Manifest.from_file(yaml_file)
439
+ with pytest.warns(UserWarning, match='Folder ".+" does not exist. Please check your manifest file'):
440
+ manifest = Manifest.from_file(yaml_file)
441
+
432
442
  assert manifest.depends_components('examples/wifi/coexist') == ['esp_hw_support']
433
443
 
434
444
 
File without changes
File without changes