"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Johannes Kastl <mail@johannes-kastl.de>
Subject:
Re: Packaging gameoftrees for openSUSE: Are there any tests I should run?
To:
gameoftrees@openbsd.org
Date:
Fri, 3 Jan 2025 10:37:56 +0100

Download raw body.

Thread
Dear Stefan,

thanks for the fast reply.

On 03.01.25 10:24 Stefan Sperling wrote:
> On Thu, Jan 02, 2025 at 11:13:17AM +0100, Johannes Kastl wrote:

>> Other than checking that the executable runs and returns the proper
>> version number, are there any tests that I should run (and which can
>> be run offline, as the build happens without network connectivity)?

> In -portable, 'make tests' should run the regression test suite.
> It currently runs the following TEST_TARGETS defined in Makefile.am:
> 
>   delta deltify fetch idset path tog cmdline
> 
> The tests depend on git and the HTTP::Daemon Perl module.

That should not be a problem.

> The tests need compiled binaries installed on the system because paths
> to helper programs, such as got-read-pack, are hard-coded in user-facing
> binaries, such as got and tog. You may have to generate RPMs and install
> them system-wide before the tests will run successfully.

This will be a problem, as AFAIK the build user does not have
permissions to install packages.

> You'll also need to set things up such that 'ssh 127.0.0.1' succeeds
> without any interactive prompting (need to accept the host key manually
> once, and ensure that an ssh key is available for authentication).

OK, should be doable.

> This is because operations such as clone and send which use the network
> will be trying to connect to 127.0.0.1 over ssh, as the same user who
> invoked 'make tests'.
> 
> The OpenBSD version of got also has tests for gotd, and gotwebd.
> As far as I can tell, these tests cannot be run in -portable yet.
> 
> There are environment variables which control some test parameters:
> 
> GOT_TEST_PACK=1 will force tests to use pack files instead of loose
> objects. GOT_TEST_PACK=ref-delta will force use of pack files with
> ref-deltas rather than offset-deltas.
> 
> GOT_TEST_ALGO=sha256 will run tests with sha256 repositories (skipping
> tests involving the network as we do not support sha256 over the Git
> network protocol yet).
> 
> GOT_TEST_ROOT can be set to a path where temporary test data gets stored.
> This defaults to /tmp.

Thanks for the detailed explanations. That should get me going!

Kind Regards,
Johannes