diff --git a/.gitlab-ci/testcases/test_device.py b/.gitlab-ci/testcases/test_device.py index 90d5895eb..4d9d5995b 100644 --- a/.gitlab-ci/testcases/test_device.py +++ b/.gitlab-ci/testcases/test_device.py @@ -96,3 +96,22 @@ def test_aports_device_kernel(args): " multiple kernels in depends (see" " ): " + path) + + +def test_aports_maintained(args): + """ + Ensure that aports in /device/{main,community} have "Maintainer:" and + "Co-Maintainer:" (only required for main) listed in their APKBUILDs. + """ + for path in glob.iglob(f"{args.aports}/device/main/*/APKBUILD"): + if '/firmware-' in path: + continue + maintainers = pmb.parse._apkbuild.maintainers(path) + assert maintainers and len(maintainers) >= 2, \ + f"{path} in main needs at least 1 Maintainer and 1 Co-Maintainer" + + for path in glob.iglob(f"{args.aports}/device/community/*/APKBUILD"): + if '/firmware-' in path: + continue + maintainers = pmb.parse._apkbuild.maintainers(path) + assert maintainers, f"{path} in community needs at least 1 Maintainer"