mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-01-03 05:02:18 +00:00
tests: abuild: port invalid-initd test
This commit is contained in:
parent
30b493d4b2
commit
07894fa745
@ -15,7 +15,8 @@ init_tests \
|
||||
abuild_checksum_generation \
|
||||
abuild_checksum_duplicates \
|
||||
abuild_subpkg_dep_leak \
|
||||
abuild_py_providers_creation
|
||||
abuild_py_providers_creation \
|
||||
abuild_reject_init_with_improper_shebang
|
||||
|
||||
export ABUILD_SHAREDIR=$(atf_get_srcdir)/..
|
||||
export ABUILD_CONF=/dev/null
|
||||
@ -309,3 +310,33 @@ abuild_py_providers_creation_body() {
|
||||
cat pkg/.control.py3-foo-and-bar/.PKGINFO
|
||||
}
|
||||
|
||||
abuild_reject_init_with_improper_shebang_body() {
|
||||
mkdir invalid-initd
|
||||
cd invalid-initd
|
||||
cat >APKBUILD<<-EOF
|
||||
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||
pkgname="invalid-initd"
|
||||
pkgver="1.0"
|
||||
pkgrel=0
|
||||
pkgdesc="Dummy test package"
|
||||
url="https://gitlab.alpinelinux.org/alpine/aports"
|
||||
arch="noarch"
|
||||
license="MIT"
|
||||
subpackages=""
|
||||
source="test.initd"
|
||||
prepare() {
|
||||
mkdir -p "\$builddir"
|
||||
}
|
||||
EOF
|
||||
cat >test.initd<<-EOF
|
||||
#!/bin/sh
|
||||
command="test"
|
||||
EOF
|
||||
abuild checksum
|
||||
|
||||
atf_check -s exit:1 \
|
||||
-o match:"OK" \
|
||||
-e match:"ERROR.*is not an openrc" \
|
||||
abuild unpack
|
||||
}
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||
|
||||
# test package
|
||||
pkgname="invalid-initd"
|
||||
pkgver="1.0"
|
||||
pkgrel=0
|
||||
pkgdesc="Dummy test package"
|
||||
url="https://gitlab.alpinelinux.org/alpine/aports"
|
||||
arch="noarch"
|
||||
license="MIT"
|
||||
subpackages=""
|
||||
source="@source@"
|
||||
builddir="$srcdir/$pkgname-$pkgver"
|
||||
|
||||
prepare() {
|
||||
mkdir -p "$builddir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
07a068119105559a79f42093bd5c1ec97323b24b485b837ed61f771180143c58715bd22137064639cdda0081e2b294255b5555ddbef98f399c47e2a67c74b058 test.initd
|
||||
"
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
command="test"
|
Loading…
Reference in New Issue
Block a user