Merge branch 'ci/fix-extra-default-build-targets' into 'master'

Ci: exclude standalone pytest folders

See merge request espressif/esp-idf!41189
This commit is contained in:
Fu Hanxi
2025-08-14 01:48:49 +02:00
11 changed files with 42 additions and 32 deletions

View File

@@ -8,7 +8,7 @@
.patterns-docs-partial: &patterns-docs-partial .patterns-docs-partial: &patterns-docs-partial
- "components/**/*.h" - "components/**/*.h"
- "components/**/CMakeList.txt" - "components/**/CMakeLists.txt"
- "components/**/sdkconfig*" - "components/**/sdkconfig*"
- "tools/tools.json" - "tools/tools.json"
- "tools/idf_tools.py" - "tools/idf_tools.py"

View File

@@ -10,7 +10,7 @@
- "**/*.{c,C,cpp}" - "**/*.{c,C,cpp}"
- "**/*.{h,H,hpp}" - "**/*.{h,H,hpp}"
- "components/**/Kconfig" - "components/**/Kconfig"
- "components/**/CMakeList.txt" - "components/**/CMakeLists.txt"
.patterns-python-cache: &patterns-python-cache .patterns-python-cache: &patterns-python-cache
- "tools/requirements.json" - "tools/requirements.json"

View File

@@ -1,4 +1,13 @@
preserve_non_test_related_apps = false preserve_non_test_related_apps = false
exclude_dirs = [
'tools/test_mkdfu',
'tools/test_idf_size',
'tools/test_idf_py',
'tools/test_idf_diag',
'tools/test_bsasm',
'tools/ci/test_autocomplete',
'tools/test_build_system',
]
[local_runtime_envs] [local_runtime_envs]
EXTRA_CFLAGS = "-Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function -Wstrict-prototypes" EXTRA_CFLAGS = "-Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function -Wstrict-prototypes"

View File

@@ -143,7 +143,7 @@ repos:
require_serial: true require_serial: true
additional_dependencies: additional_dependencies:
- PyYAML == 5.3.1 - PyYAML == 5.3.1
- idf-build-apps~=2.11 - idf-build-apps~=2.12
- id: sort-yaml-files - id: sort-yaml-files
name: sort yaml files name: sort yaml files
entry: tools/ci/sort_yaml.py entry: tools/ci/sort_yaml.py

View File

@@ -36,15 +36,19 @@ examples/wifi/ftm:
examples/wifi/getting_started: examples/wifi/getting_started:
<<: *wifi_depends_default <<: *wifi_depends_default
enable: enable:
- if: IDF_TARGET == "esp32h2" - if: INCLUDE_DEFAULT == 1 || IDF_TARGET == "esp32h2"
disable: disable:
- if: (SOC_WIFI_SUPPORTED != 1) and (SOC_WIRELESS_HOST_SUPPORTED != 1) - if: (SOC_WIFI_SUPPORTED != 1) and (SOC_WIRELESS_HOST_SUPPORTED != 1)
disable_test:
- if: IDF_TARGET == "esp32p4"
temporary: true
reason: lack of runners
depends_filepatterns: depends_filepatterns:
- examples/wifi/getting_started/**/* - examples/wifi/getting_started/**/*
examples/wifi/iperf: examples/wifi/iperf:
enable: enable:
- if: IDF_TARGET == "esp32h2" - if: INCLUDE_DEFAULT == 1 || IDF_TARGET == "esp32h2"
disable: disable:
- if: (SOC_WIFI_SUPPORTED != 1) and (SOC_WIRELESS_HOST_SUPPORTED != 1) - if: (SOC_WIFI_SUPPORTED != 1) and (SOC_WIRELESS_HOST_SUPPORTED != 1)
- if: (IDF_TARGET == "esp32p4") and CONFIG_NAME in ["defaults", "99"] - if: (IDF_TARGET == "esp32p4") and CONFIG_NAME in ["defaults", "99"]

View File

@@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 | ESP32-P4 | ESP32-H2 | | Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | -------- | -------- | | ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- |
# Wi-Fi SoftAP Example # Wi-Fi SoftAP Example

View File

@@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 | ESP32-P4 | ESP32-H2 | | Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | -------- | -------- | | ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- |
# Wi-Fi Station Example # Wi-Fi Station Example

View File

@@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-P4 | ESP32-S2 | ESP32-S3 | ESP32-H2 | | Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | -------- | | ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- |
# Iperf Example # Iperf Example

View File

@@ -5,7 +5,6 @@ import argparse
import os import os
import re import re
import sys import sys
import typing as t
from collections import defaultdict from collections import defaultdict
from pathlib import Path from pathlib import Path
@@ -42,7 +41,7 @@ FORMAL_TO_USUAL = {v: k for k, v in USUAL_TO_FORMAL.items()}
def print_diff_table( def print_diff_table(
list1: list[str], list2: list[str], title1: str, title2: str, excluded: t.Optional[list[str]] = None list1: list[str], list2: list[str], title1: str, title2: str, excluded: list[str] | None = None
) -> None: ) -> None:
left_set = set(list1) left_set = set(list1)
right_set = set(list2) right_set = set(list2)
@@ -82,7 +81,7 @@ def print_diff_table(
console.print(table) console.print(table)
def get_readme_path(app_dir: str) -> t.Optional[str]: def get_readme_path(app_dir: str) -> str | None:
readme_path = os.path.join(app_dir, 'README.md') readme_path = os.path.join(app_dir, 'README.md')
if not os.path.isfile(readme_path): if not os.path.isfile(readme_path):
@@ -105,7 +104,7 @@ def generate_new_support_table(targets: list[str]) -> str:
return res return res
def parse_existing_table(app_dir: str) -> t.Tuple[t.Optional[str], list[str]]: def parse_existing_table(app_dir: str) -> tuple[str | None, list[str]]:
readme_path = get_readme_path(app_dir) readme_path = get_readme_path(app_dir)
if not readme_path: if not readme_path:
return None, SUPPORTED_TARGETS return None, SUPPORTED_TARGETS
@@ -124,9 +123,9 @@ def parse_existing_table(app_dir: str) -> t.Tuple[t.Optional[str], list[str]]:
def get_grouped_apps( def get_grouped_apps(
paths: list[str], paths: list[str],
exclude_dirs: t.Optional[list[str]] = None, exclude_dirs: list[str] | None = None,
extra_targets: t.Optional[list[str]] = None, extra_targets: list[str] | None = None,
) -> t.Dict[str, t.List[App]]: ) -> dict[str, list[App]]:
apps = sorted( apps = sorted(
find_apps( find_apps(
paths, paths,
@@ -136,7 +135,7 @@ def get_grouped_apps(
) )
) )
grouped_apps: t.Dict[str, t.List[App]] = defaultdict(list) grouped_apps: dict[str, list[App]] = defaultdict(list)
for app in apps: for app in apps:
grouped_apps[app.app_dir].append(app) grouped_apps[app.app_dir].append(app)
@@ -145,9 +144,9 @@ def get_grouped_apps(
def check_readme( def check_readme(
paths: list[str], paths: list[str],
exclude_dirs: t.Optional[list[str]] = None, exclude_dirs: list[str] | None = None,
*, *,
extra_targets: t.Optional[list[str]] = None, extra_targets: list[str] | None = None,
) -> None: ) -> None:
grouped_apps = get_grouped_apps(paths, exclude_dirs, extra_targets) grouped_apps = get_grouped_apps(paths, exclude_dirs, extra_targets)
exit_code = 0 exit_code = 0
@@ -200,8 +199,6 @@ def check_readme(
if exit_code != 0: if exit_code != 0:
print('') # extra new line for readability print('') # extra new line for readability
if exit_code != 0:
print('Related documentation:') print('Related documentation:')
print( print(
'\t- https://docs.espressif.com/projects/idf-build-apps/en/latest/references/manifest.html#enable-disable-rules' '\t- https://docs.espressif.com/projects/idf-build-apps/en/latest/references/manifest.html#enable-disable-rules'
@@ -209,7 +206,7 @@ def check_readme(
sys.exit(exit_code) sys.exit(exit_code)
def get_grouped_cases(paths: list[str]) -> t.Dict[str, t.Dict[str, t.Set[str]]]: def get_grouped_cases(paths: list[str]) -> dict[str, dict[str, set[str]]]:
""" """
return something like this: return something like this:
{ {
@@ -244,10 +241,10 @@ def get_grouped_cases(paths: list[str]) -> t.Dict[str, t.Dict[str, t.Set[str]]]:
def check_test_scripts( def check_test_scripts(
paths: list[str], paths: list[str],
exclude_dirs: t.Optional[list[str]] = None, exclude_dirs: list[str] | None = None,
*, *,
extra_targets: t.Optional[list[str]] = None, extra_targets: list[str] | None = None,
bypass_targets: t.Optional[list[str]] = None, bypass_targets: list[str] | None = None,
) -> None: ) -> None:
# takes long time, run only in CI # takes long time, run only in CI
grouped_apps = get_grouped_apps(paths, exclude_dirs, extra_targets) grouped_apps = get_grouped_apps(paths, exclude_dirs, extra_targets)
@@ -283,9 +280,9 @@ def check_test_scripts(
for script_path in grouped_cases[app_dir]['script_paths']: for script_path in grouped_cases[app_dir]['script_paths']:
print(' - ' + script_path) print(' - ' + script_path)
exit_code = 1 exit_code = 1
print('') # extra new line for readability
if exit_code != 0: if exit_code != 0:
print('') # extra new line for readability
print('Related documentation:') print('Related documentation:')
print( print(
'\t- https://docs.espressif.com/projects/idf-build-apps/en/latest/references/manifest.html#enable-disable-rules' '\t- https://docs.espressif.com/projects/idf-build-apps/en/latest/references/manifest.html#enable-disable-rules'

View File

@@ -6,7 +6,7 @@
# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/tools/idf-tools.html # https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/tools/idf-tools.html
# ci # ci
idf-ci>=0.2.3,<1 idf-ci>=0.3,<1
coverage coverage
jsonschema jsonschema

View File

@@ -2,7 +2,7 @@
Certain combinations of configs, e.g. stack and heap debug configs, are useful to set in most test apps. Certain combinations of configs, e.g. stack and heap debug configs, are useful to set in most test apps.
To facilitiate re-use, this folder contains some of the most common ones. To facilitate reuse, this folder contains some of the most common ones.
These can then be added to the list of default configs in test apps: These can then be added to the list of default configs in test apps:
@@ -10,6 +10,6 @@ These can then be added to the list of default configs in test apps:
list(PREPEND SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers" "sdkconfig.defaults") list(PREPEND SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers" "sdkconfig.defaults")
``` ```
Note that this must be set in the top-level project `CMakelist.txt`. Note that this must be set in the top-level project `CMakelists.txt`.
These files should not be considered stable, and are thus not recommended for use outside of IDF. These files should not be considered stable, and are thus not recommended for use outside of IDF.