There is no provided test suite. The `build.ninja` is meant to be an
alternative build mechanism and requires modification to set desired
compile and link flags.
So, running `./samu` in check() will rebuild itself before packaging,
but without the CFLAGS and LDFLAGS set by abuild, resulting in an
unoptimized binary.
---
testing/samurai/APKBUILD | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/testing/samurai/APKBUILD b/testing/samurai/APKBUILD
index fa51ea9a6d..befb1c1772 100644
--- a/testing/samurai/APKBUILD+++ b/testing/samurai/APKBUILD
@@ -2,11 +2,12 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=samurai
pkgver=0.6
-pkgrel=0+pkgrel=1pkgdesc="ninja-compatible build tool written in C"
url="https://github.com/michaelforney/samurai"
arch="all"
license="Apache-2.0"
+options="!check" # No test suite.subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/michaelforney/$pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"
@@ -16,12 +17,6 @@ build() {
make
}
-check() {- cd "$builddir"- rm *.o- ./samu-}-package() {
cd "$builddir"
make install PREFIX="/usr" DESTDIR="$pkgdir"
--
2.19.1
---
Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org
Help: alpine-aports+help@lists.alpinelinux.org
---
[alpine-aports] [PATCH 2/2] testing/samurai: use upstream provided source archive
On 2019-03-24, Drew DeVault <sir@cmpwn.com> wrote:
> Sorry I missed this - can you Cc me on future patches?
Sure.
>> There is no provided test suite. The `build.ninja` is meant to be an>> alternative build mechanism and requires modification to set desired>> compile and link flags.>>>> So, running `./samu` in check() will rebuild itself before packaging,>> but without the CFLAGS and LDFLAGS set by abuild, resulting in an>> unoptimized binary.>> Hm, I understand the problem, but having samu build itself seems like a> pretty good test. I'd rather fix the CFLAGS/LDFLAGS than nix the check()> entirely. Testing a full gcc bootstrap involves a similar process.>> Thoughts?
I think it's fine to build itself as a test, but I think that the
binary that gets installed should be the one produced in build(). I
don't know much about the Alpine build system, but I assume check()
does not get run for cross builds, and I think it would be bad to
build the binary two different ways depending on whether we were able
to run check().
So, maybe you could just rename the binary at the end of build(), and
install that version in package()? Or, extract the sources again
somewhere else and run `./samu -C $checkdir`.
---
Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org
Help: alpine-aports+help@lists.alpinelinux.org
---
Sorry I missed this - can you Cc me on future patches?
+1 on patch 2/2
> There is no provided test suite. The `build.ninja` is meant to be an> alternative build mechanism and requires modification to set desired> compile and link flags.> > So, running `./samu` in check() will rebuild itself before packaging,> but without the CFLAGS and LDFLAGS set by abuild, resulting in an> unoptimized binary.
Hm, I understand the problem, but having samu build itself seems like a
pretty good test. I'd rather fix the CFLAGS/LDFLAGS than nix the check()
entirely. Testing a full gcc bootstrap involves a similar process.
Thoughts?
---
Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org
Help: alpine-aports+help@lists.alpinelinux.org
---