Mail archive
alpine-aports

[alpine-aports] Re: [PATCH 1/2] testing/samurai: remove check()

From: Michael Forney <mforney_at_mforney.org>
Date: Sun, 24 Mar 2019 20:00:36 -0700

On 2019-03-24, Drew DeVault <sir_at_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_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sun Mar 24 2019 - 20:00:36 UTC