test: Test subpackages which set a different architecture (MR 2267)

This commit is contained in:
Newbyte 2024-02-26 20:36:48 +01:00
parent 71ac87e6af
commit 812a3e4a85
No known key found for this signature in database
GPG Key ID: 8A700086A9FE41FD
2 changed files with 8 additions and 1 deletions

View File

@ -33,6 +33,9 @@ def test_subpackages():
assert subpkg["pkgdesc"] == "This is one of the custom subpackages"
assert subpkg["depends"] == ["postmarketos-base", "glibc"]
subpkg = apkbuild["subpackages"]["different_arch"]
assert subpkg["pkgdesc"] == "This has a different architecture than the other subpackages"
# Successful extraction
path = (testdata + "/init_questions_device/aports/device/testing/"
"device-nonfree-firmware/APKBUILD")

View File

@ -1,6 +1,6 @@
pkgname="subpackages"
arch="noarch"
subpackages="simple custom:custom_function"
subpackages="simple custom:custom_function different_arch::x86_64"
depends="postmarketos-base"
simple() {
@ -11,3 +11,7 @@ custom_function() {
pkgdesc="This is one of the custom $pkgname"
depends="$depends glibc"
}
different_arch() {
pkgdesc="This has a different architecture than the other $pkgname"
}