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
- "components/**/*.h"
- "components/**/CMakeList.txt"
- "components/**/CMakeLists.txt"
- "components/**/sdkconfig*"
- "tools/tools.json"
- "tools/idf_tools.py"

View File

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

View File

@@ -1,4 +1,13 @@
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]
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
additional_dependencies:
- PyYAML == 5.3.1
- idf-build-apps~=2.11
- idf-build-apps~=2.12
- id: sort-yaml-files
name: sort yaml files
entry: tools/ci/sort_yaml.py

View File

@@ -36,15 +36,19 @@ examples/wifi/ftm:
examples/wifi/getting_started:
<<: *wifi_depends_default
enable:
- if: IDF_TARGET == "esp32h2"
- if: INCLUDE_DEFAULT == 1 || IDF_TARGET == "esp32h2"
disable:
- 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:
- examples/wifi/getting_started/**/*
examples/wifi/iperf:
enable:
- if: IDF_TARGET == "esp32h2"
- if: INCLUDE_DEFAULT == 1 || IDF_TARGET == "esp32h2"
disable:
- if: (SOC_WIFI_SUPPORTED != 1) and (SOC_WIRELESS_HOST_SUPPORTED != 1)
- 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

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

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

View File

@@ -5,7 +5,6 @@ import argparse
import os
import re
import sys
import typing as t
from collections import defaultdict
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(
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:
left_set = set(list1)
right_set = set(list2)
@@ -82,7 +81,7 @@ def print_diff_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')
if not os.path.isfile(readme_path):
@@ -105,7 +104,7 @@ def generate_new_support_table(targets: list[str]) -> str:
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)
if not readme_path:
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(
paths: list[str],
exclude_dirs: t.Optional[list[str]] = None,
extra_targets: t.Optional[list[str]] = None,
) -> t.Dict[str, t.List[App]]:
exclude_dirs: list[str] | None = None,
extra_targets: list[str] | None = None,
) -> dict[str, list[App]]:
apps = sorted(
find_apps(
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:
grouped_apps[app.app_dir].append(app)
@@ -145,9 +144,9 @@ def get_grouped_apps(
def check_readme(
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:
grouped_apps = get_grouped_apps(paths, exclude_dirs, extra_targets)
exit_code = 0
@@ -198,10 +197,8 @@ def check_readme(
print(f'Auto-fixing: Modified README: {readme_path}')
exit_code = 1
if exit_code != 0:
print('') # extra new line for readability
if exit_code != 0:
print('') # extra new line for readability
print('Related documentation:')
print(
'\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)
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:
{
@@ -244,10 +241,10 @@ def get_grouped_cases(paths: list[str]) -> t.Dict[str, t.Dict[str, t.Set[str]]]:
def check_test_scripts(
paths: list[str],
exclude_dirs: t.Optional[list[str]] = None,
exclude_dirs: list[str] | None = None,
*,
extra_targets: t.Optional[list[str]] = None,
bypass_targets: t.Optional[list[str]] = None,
extra_targets: list[str] | None = None,
bypass_targets: list[str] | None = None,
) -> None:
# takes long time, run only in CI
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']:
print(' - ' + script_path)
exit_code = 1
print('') # extra new line for readability
if exit_code != 0:
print('') # extra new line for readability
print('Related documentation:')
print(
'\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
# ci
idf-ci>=0.2.3,<1
idf-ci>=0.3,<1
coverage
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.
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:
@@ -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")
```
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.