From 3cdc303f02b24c588c0429f7f0ff28714c5af8f1 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Wed, 18 Mar 2026 11:38:14 +0800 Subject: [PATCH] ci: fix check-build-test-rules exclude-dir --- .pre-commit-config.yaml | 2 +- tools/ci/check_build_test_rules.py | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 85cdb8a987..cccc49ad76 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -141,7 +141,7 @@ repos: name: Check if all apps readme files match given .build-test-rules.yml files. Modify the supported target tables entry: tools/ci/check_build_test_rules.py check-readmes language: python - files: 'tools/test_apps/.+|examples/.+|components/.+|tools/idf_py_actions/constants.py|tools/ci/check_build_test_rules.py' + files: 'tools/.+|examples/.+|components/.+' require_serial: true additional_dependencies: - PyYAML == 5.3.1 diff --git a/tools/ci/check_build_test_rules.py b/tools/ci/check_build_test_rules.py index 9700fa6440..5f9727aef2 100755 --- a/tools/ci/check_build_test_rules.py +++ b/tools/ci/check_build_test_rules.py @@ -336,15 +336,13 @@ if __name__ == '__main__': if check_all: check_dirs = {IDF_PATH} - _exclude_dirs = [ - os.path.join(IDF_PATH, 'tools', 'unit-test-app'), - os.path.join(IDF_PATH, 'tools', 'test_build_system', 'build_test_app'), - os.path.join(IDF_PATH, 'tools', 'test_build_system', 'buildv2_test_app'), - os.path.join(IDF_PATH, 'tools', 'templates', 'sample_project'), - os.path.join(IDF_PATH, 'tools', 'cmakev2', 'test'), - ] - else: - _exclude_dirs = [os.path.join(IDF_PATH, 'tools', 'templates', 'sample_project')] + + _exclude_dirs = [ + os.path.join(IDF_PATH, 'tools', 'unit-test-app'), + os.path.join(IDF_PATH, 'tools', 'test_build_system'), + os.path.join(IDF_PATH, 'tools', 'templates', 'sample_project'), + os.path.join(IDF_PATH, 'tools', 'cmakev2', 'test'), + ] _bypass_targets: t.List[str] = [] if arg.config: