From: Anna Vyalkova Subject: [PATCH 2/2] portable: Makefile: include tests in release tarballs To: gameoftrees@openbsd.org Date: Wed, 8 Mar 2023 23:52:39 +0500 As tests are not really well integrated with autotools, the whole 'regress' folder is included. The `git clean -xf regress` command is used to remove stray files. Also 'make distcheck' now runs tests, hence new `mkdir` calls. --- Makefile.am | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 2b17e07b4..e6c35a8c9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,7 @@ SUBDIRS = compat libexec got tog gotadmin template gotwebd include $(top_builddir)/Makefile.common -EXTRA_DIST = CHANGES CHANGELOG LICENCE util/got-portable-ver.sh +EXTRA_DIST = CHANGES CHANGELOG LICENCE regress util/got-portable-ver.sh LDADD = $(LIBOBJS) if HOST_FREEBSD @@ -30,6 +30,7 @@ tests: check postinstallcheck regress-cmdline: (export PLATFORM=@PLATFORM@; \ + mkdir -p $(top_builddir)/regress/cmdline \ cd $(top_builddir)/regress/cmdline || exit $$?; \ ./checkout.sh -q -r "$(GOT_TEST_ROOT)"; \ ./update.sh -q -r "$(GOT_TEST_ROOT)"; \ @@ -63,6 +64,7 @@ regress-cmdline: ./cleanup.sh -q -r "$(GOT_TEST_ROOT)") regress-delta: + mkdir -p $(top_builddir)/regress/delta $(CC) $(DEFS) $(AM_CFLAGS) $(AM_CPPFLAGS) \ -o $(top_builddir)/regress/delta/delta_test \ $(top_srcdir)/lib/bloom.c \ @@ -103,6 +105,7 @@ regress-delta: $(top_builddir)/regress/delta/delta_test regress-deltify: + mkdir -p $(top_builddir)/regress/deltify $(CC) $(DEFS) $(AM_CFLAGS) $(AM_CPPFLAGS) \ -o $(top_builddir)/regress/deltify/deltify_test \ $(top_srcdir)/lib/bloom.c \ @@ -143,6 +146,7 @@ regress-deltify: $(top_builddir)/regress/deltify/deltify_test regress-fetch: + mkdir -p $(top_builddir)/regress/fetch $(CC) $(DEFS) $(AM_CFLAGS) $(AM_CPPFLAGS) \ -o $(top_builddir)/regress/fetch/fetch_test \ $(top_srcdir)/lib/bloom.c \ @@ -185,6 +189,7 @@ regress-fetch: $(top_builddir)/regress/fetch/fetch_test regress-idset: + mkdir -p $(top_builddir)/regress/idset $(CC) $(DEFS) $(AM_CFLAGS) $(AM_CPPFLAGS) \ -o $(top_builddir)/regress/idset/idset_test \ $(top_srcdir)/lib/bloom.c \ @@ -227,6 +232,7 @@ regress-idset: $(top_builddir)/regress/idset/idset_test regress-path: + mkdir -p $(top_builddir)/regress/path $(CC) $(DEFS) $(AM_CFLAGS) $(AM_CPPFLAGS) \ -o $(top_builddir)/regress/path/path_test \ $(top_srcdir)/lib/bloom.c \ @@ -267,3 +273,6 @@ regress-path: $(top_srcdir)/regress/path/path_test.c \ -L$(top_builddir)/compat -lopenbsd-compat $(LIBS) && \ $(top_builddir)/regress/path/path_test + +dist-hook: + -git clean -xf regress -- 2.39.2