From 13c34b979367df3d0b54211b1bf0ad5d76586549 Mon Sep 17 00:00:00 2001 From: Alexey Minnekhanov Date: Thu, 24 Jun 2021 20:10:48 +0300 Subject: [PATCH] CI: test for cross-compilers in makedepends (MR 2272) Related: #1128 [ci:skip-build] Will not finish in 3h on CI. Builds locally. --- .gitlab-ci/testcases/test_kernel.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci/testcases/test_kernel.py b/.gitlab-ci/testcases/test_kernel.py index ebb8bfef9..fe4c3c07d 100644 --- a/.gitlab-ci/testcases/test_kernel.py +++ b/.gitlab-ci/testcases/test_kernel.py @@ -18,7 +18,18 @@ def test_aports_kernel(args): for path in glob.iglob(f"{args.aports}/**/linux-*/APKBUILD", recursive=True): apkbuild = pmb.parse.apkbuild(args, path) + aport_name = os.path.basename(os.path.dirname(path)) if "pmb:cross-native" not in apkbuild["options"]: - raise RuntimeError("\"pmb:cross-native\" missing in" - f" options= line: {path}") + raise RuntimeError(f"{aport_name}: \"pmb:cross-native\" missing in" + " options= line") + + # cross-compilers should not be in makedepends + for ccc in ["gcc-armv7", "gcc-armhf", "gcc-aarch64", + "gcc4-armv7", "gcc4-armhf", "gcc4-aarch64", + "gcc6-armv7", "gcc6-armhf", "gcc6-aarch64"]: + if ccc in apkbuild["makedepends"]: + raise RuntimeError(f"{aport_name}: Cross-compiler ({ccc}) should" + " not be explicitly specified in makedepends!" + " pmbootstrap installs cross-compiler" + " automatically.")