From: Stefan Sperling Subject: Re: Packaging gameoftrees for openSUSE: Are there any tests I should run? To: Johannes Kastl Cc: gameoftrees@openbsd.org Date: Fri, 3 Jan 2025 10:24:15 +0100 On Thu, Jan 02, 2025 at 11:13:17AM +0100, Johannes Kastl wrote: > Dear Game of Trees maintainers, > > finally I had time to continue packaging got for openSUSE. I have a > working package and several executables that seem to at least do > something. > > https://build.opensuse.org/package/show/home:ojkastl_buildservice:Branch_devel_tools_scm/got > > 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)? > > I need to wrap my head around all of the moving parts and will try to > test all of the components, to at least get an understanding which > parts are working properly yet (and which I have messed up...). 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. 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. 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). 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.