mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-01-02 20:42:43 +00:00
tests: add test for validating depends
This commit is contained in:
parent
d5591e6ccf
commit
ca9a11e492
@ -23,6 +23,7 @@ init_tests \
|
||||
abuild_invalid_subpkgnames \
|
||||
abuild_invalid_subpkg_version \
|
||||
abuild_provide_pkgname \
|
||||
abuild_validate_depends \
|
||||
abuild_subpackage_arch \
|
||||
abuild_large_doc_subpackage \
|
||||
abuild_bigdocs \
|
||||
@ -473,6 +474,24 @@ abuild_provide_pkgname_body() {
|
||||
abuild validate
|
||||
}
|
||||
|
||||
abuild_validate_depends_body() {
|
||||
init_keys
|
||||
cp -ra "$testrepo"/test-pkgname .
|
||||
cd test-pkgname
|
||||
TESTDEPENDS="foo" TESTMAKEDEPENDS="bar" \
|
||||
atf_check -s exit:0 \
|
||||
-e match:"Validating" \
|
||||
abuild validate
|
||||
TESTDEPENDS="foo=1.0 bar>=1.0" TESTMAKEDEPENDS="baz<=1.0 x<2.0 z>1 !blah" \
|
||||
atf_check -s exit:0 \
|
||||
-e match:"Validating" \
|
||||
abuild validate
|
||||
TESTDEPENDS="foo~1.0 bar>~1.0 baz<~1"
|
||||
atf_check -s exit:0 \
|
||||
-e match:"Validating" \
|
||||
abuild validate
|
||||
}
|
||||
|
||||
abuild_subpackage_arch_body() {
|
||||
init_keys
|
||||
cp -ra "$testrepo" .
|
||||
|
@ -8,6 +8,8 @@ arch="noarch"
|
||||
license="MIT"
|
||||
provides="${TESTPROVIDES-provided}"
|
||||
subpackages="${TESTSUBNAME-$pkgname-sub}:_sub"
|
||||
depends="$TESTDEPENDS"
|
||||
makedepends="$TESTMAKEDEPENDS"
|
||||
|
||||
prepare() {
|
||||
mkdir -p "$builddir"
|
||||
|
Loading…
Reference in New Issue
Block a user