mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-03-11 06:37:31 +00:00
tests: add test for -dbg package
This commit is contained in:
parent
32b7789e9a
commit
39b552751e
@ -49,6 +49,11 @@ teardown() {
|
||||
$ABUILD cleanpkg
|
||||
}
|
||||
|
||||
@test "abuild: test -dbg subpackage" {
|
||||
cd testrepo/dbgpkg
|
||||
$ABUILD
|
||||
}
|
||||
|
||||
@test "abuild: verify that packages are reproducible built" {
|
||||
cd testrepo/pkg1
|
||||
arch=$($ABUILD -A)
|
||||
|
34
tests/testrepo/dbgpkg/APKBUILD
Normal file
34
tests/testrepo/dbgpkg/APKBUILD
Normal file
@ -0,0 +1,34 @@
|
||||
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||
|
||||
# test package
|
||||
pkgname="dbgpkg"
|
||||
pkgver="1.0"
|
||||
pkgrel=0
|
||||
pkgdesc="Dummy test package to test -dbg"
|
||||
url="https://gitlab.alpinelinux.org/alpine/aports"
|
||||
arch="all"
|
||||
license="MIT"
|
||||
subpackages="$pkgname-dbg"
|
||||
source="hello.c"
|
||||
builddir="$srcdir/dbgpkg-1.0"
|
||||
|
||||
prepare() {
|
||||
mkdir -p "$builddir"
|
||||
cp "$srcdir"/*.c "$builddir"
|
||||
}
|
||||
|
||||
build() {
|
||||
${CC:-gcc} -o hello hello.c
|
||||
}
|
||||
|
||||
check() {
|
||||
./hello
|
||||
}
|
||||
|
||||
package() {
|
||||
install -D -m755 hello "$pkgdir"/usr/bin/hello
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
e80c0d471f7ec07708795b86127f0f7c968c49031f1e57cae200b5fbf2606e55fc4d56efb05a85c6f54dfe33e87d6789154cf15aee72ba0d216f08fb57926503 hello.c
|
||||
"
|
5
tests/testrepo/dbgpkg/hello.c
Normal file
5
tests/testrepo/dbgpkg/hello.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include <stdio.h>
|
||||
int main() {
|
||||
printf("hello world\n");
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user