tests(abuild): test whether pyX.Y providers work

This commit is contained in:
Leo 2021-04-29 12:36:08 -03:00
parent ac3ee42458
commit 2ed215fa32
2 changed files with 24 additions and 0 deletions

View File

@ -167,3 +167,12 @@ teardown() {
grep 'depend = sed' pkg/.control.subpkg-dep-leak-subpkg/.PKGINFO
! grep 'depend = tar' pkg/.control.subpkg-dep-leak-subpkg/.PKGINFO
}
@test "abuild: test py-providers creation" {
cd testrepo/py3-foo-and-bar
$ABUILD rootpkg
run grep -x py3.9:foo=1.0.0-r0 pkg/.control.py3-foo-and-bar/.py-provides
run grep -x 'provides py3.9:foo=1.0.0-r0' pkg/.control.py3-foo-and-bar/.PKGINFO
run grep -x py3.9:bar=1.0.0-r0 pkg/.control.py3-foo-and-bar/.py-provides
run grep -x 'provides py3.9:bar=1.0.0-r0' pkg/.control.py3-foo-and-bar/.PKGINFO
}

View File

@ -0,0 +1,15 @@
# Maintainer: Test user <user@example.com>
pkgname=py3-foo-and-bar
pkgver=1.0.0
pkgrel=0
pkgdesc="dummy package for test"
url="https://alpinelinux.org"
license="MIT"
builddir="$srcdir"
_sitedir=usr/lib/python3.9/site-packages
package() {
mkdir -p "$pkgdir"/$_sitedir/foo
touch "$pkgdir"/$_sitedir/foo/__init__.py
touch "$pkgdir"/$_sitedir/bar.py
}