diff --git a/.gitlab-ci/check_devices_in_wiki.py b/.gitlab-ci/check_devices_in_wiki.py index 3b878f792..6bf603f90 100755 --- a/.gitlab-ci/check_devices_in_wiki.py +++ b/.gitlab-ci/check_devices_in_wiki.py @@ -16,6 +16,14 @@ def get_devices(): "/.."))) for path in glob.glob(pmaports + "/device/*/device-*/"): device = os.path.dirname(path).split("device-", 1)[1] + + # -downstream suffix is used when packaging the downstream kernel for + # devices that have a working mainline kernel. Those are usually + # unmaintained and therefore might not appear in the wiki. However, + # the main device should be documented (remove the -downstream suffix). + if device.endswith('-downstream'): + device = device[:-len('-downstream')] + ret.append(device) return sorted(ret) diff --git a/.gitlab-ci/testcases/test_device.py b/.gitlab-ci/testcases/test_device.py index 4d9d5995b..5fd49b04d 100644 --- a/.gitlab-ci/testcases/test_device.py +++ b/.gitlab-ci/testcases/test_device.py @@ -115,3 +115,14 @@ def test_aports_maintained(args): continue maintainers = pmb.parse._apkbuild.maintainers(path) assert maintainers, f"{path} in community needs at least 1 Maintainer" + + +def test_aports_unmaintained(args): + """ + Ensure that aports in /device/unmaintained have an "Unmaintained:" comment + that describes why the aport is unmaintained. + """ + for path in glob.iglob(f"{args.aports}/device/unmaintained/*/APKBUILD"): + unmaintained = pmb.parse._apkbuild.unmaintained(path) + assert unmaintained, f"{path} should have an Unmaintained: " +\ + "comment that describes why the package is unmaintained" diff --git a/.gitlab-ci/testcases/test_directory_structure.py b/.gitlab-ci/testcases/test_directory_structure.py index 5566558a4..5f7af3766 100644 --- a/.gitlab-ci/testcases/test_directory_structure.py +++ b/.gitlab-ci/testcases/test_directory_structure.py @@ -10,6 +10,7 @@ expected_directories = [ "device/community", "device/main", "device/testing", + "device/unmaintained", "kde", "maemo", "main",