ci: check that kernels have pmb:cross-native enabled (MR 1247)

follow up to
https://gitlab.com/postmarketOS/pmbootstrap/-/issues/1910,
https://gitlab.com/postmarketOS/pmaports/-/merge_requests/1169 and
https://gitlab.com/postmarketOS/pmaports/-/merge_requests/1187.

Fixing the repo is good, but keeping it clean is better. Ensuring it
before merge will avoid yet another fixup commit.
This commit is contained in:
Antoine Fontaine 2020-05-17 16:38:57 +02:00 committed by Alexey Min
parent 3ceafb3c79
commit 307f4f19e6
No known key found for this signature in database
GPG key ID: EBF5ECFFFEE34DED

View file

@ -96,11 +96,23 @@ def device_dependency_check(apkbuild, path):
" <https://postmarketos.org/devicepkg>.")
def test_aports_kernel(args):
"""
Various tests performed on the /**/linux-* aports.
"""
for path in glob.iglob(args.aports + "**/linux-*/APKBUILD", recursive=True):
apkbuild = pmb.parse.apkbuild(args, path)
if "pmb:cross-native" not in apkbuild["options"]:
raise RuntimeError("\"pmb:cross-native\" missing in"
f" options= line: {path}")
def test_aports_device(args):
"""
Various tests performed on the /device/*/device-* aports.
"""
for path in glob.glob(args.aports + "/device/*/device-*/APKBUILD"):
for path in glob.iglob(args.aports + "/device/*/device-*/APKBUILD"):
apkbuild = pmb.parse.apkbuild(args, path)
# Depends: Require "postmarketos-base"