tests: test for build failure

This commit is contained in:
Natanael Copa 2020-10-29 12:32:28 +00:00
parent b6a807296f
commit 3a75c39860
2 changed files with 37 additions and 0 deletions

View File

@ -16,3 +16,10 @@ setup() {
cd testrepo/pkg1
$ABUILD
}
@test "abuild: build failure" {
cd testrepo/buildfail
run $ABUILD
[ $status -ne 0 ]
}

View File

@ -0,0 +1,30 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
# test package
pkgname="buildfail"
pkgver="1.0"
pkgrel=0
pkgdesc="Dummy test package that fails to build"
url="https://gitlab.alpinelinux.org/alpine/aports"
arch="noarch"
license="MIT"
subpackages="$pkgname-dev $pkgname-doc"
source=""
prepare() {
mkdir -p "$builddir"
}
build() {
false
}
check() {
true
}
package() {
mkdir -p "$pkgdir"
cp -r * "$pkgdir"/
}