From ca97b715c74f9591acb84991ca984c80ce26c800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Correa=20G=C3=B3mez?= Date: Mon, 22 Sep 2025 19:28:09 +0200 Subject: [PATCH] ci: ignore docs while checking for files in packages Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7065 --- .ci/testcases/test_directory_structure.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.ci/testcases/test_directory_structure.py b/.ci/testcases/test_directory_structure.py index dc20b1375..10823a75f 100644 --- a/.ci/testcases/test_directory_structure.py +++ b/.ci/testcases/test_directory_structure.py @@ -46,20 +46,20 @@ def test_executable_files(): "m0755` or a variation thereof.") -# Make sure files are either: -# - in root directory (README.md) -# - hidden (.ci/, device/.shared-patches/) -# - or belong to a package (below a directory with APKBUILD) +# Make sure files belong to a package (below a directory with APKBUILD) def test_files_belong_to_package(): # Walk directories and set package_dir when we find an APKBUILD # This allows matching files in subdirectories to the package directory. package_dir = None for dirpath, dirs, files in os.walk("."): - # Skip "hidden" directories + # Skip "hidden" directories (.ci/, device/.shared-patches/) dirs[:] = [d for d in dirs if not d.startswith(".")] - # Ignore files in root directory + # Ignore files in root directory (README.md) if dirpath == '.': continue + # Ignore files under docs/ + if dirpath.startswith('./docs'): + continue # Switched to another directory? if package_dir and not dirpath.startswith(package_dir + os.sep):