From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Phil Sutter <phil@nwl.cc>, netfilter-devel@vger.kernel.org
Subject: Re: [nft PATCH v3 11/11] Makefile: Enable support for 'make check'
Date: Thu, 4 Sep 2025 18:57:52 +0200 [thread overview]
Message-ID: <aLnFEDmuqOckePL8@calendula> (raw)
In-Reply-To: <aLm8pkZu0r1hrlUf@orbyte.nwl.cc>
On Thu, Sep 04, 2025 at 06:21:59PM +0200, Phil Sutter wrote:
> On Thu, Sep 04, 2025 at 05:24:59PM +0200, Pablo Neira Ayuso wrote:
> > On Wed, Sep 03, 2025 at 07:22:59PM +0200, Phil Sutter wrote:
> [...]
> > > diff --git a/Makefile.am b/Makefile.am
> > > index 5190a49ae69f1..9112faa2d5c04 100644
> > > --- a/Makefile.am
> > > +++ b/Makefile.am
> > > @@ -23,6 +23,7 @@ libnftables_LIBVERSION = 2:0:1
> > > ###############################################################################
> > >
> > > ACLOCAL_AMFLAGS = -I m4
> > > +AM_DISTCHECK_CONFIGURE_FLAGS = --enable-distcheck
> > >
> > > EXTRA_DIST =
> > > BUILT_SOURCES =
> > > @@ -429,3 +430,11 @@ doc_DATA = files/nftables/main.nft
> > > tools/nftables.service: tools/nftables.service.in ${top_builddir}/config.status
> > > ${AM_V_GEN}${MKDIR_P} tools
> > > ${AM_V_at}sed -e 's|@''sbindir''@|${sbindir}|g;s|@''pkgsysconfdir''@|${pkgsysconfdir}|g' <${srcdir}/tools/nftables.service.in >$@
> > > +
> > > +if !BUILD_DISTCHECK
> > > +TESTS = tests/build/run-tests.sh \
> > > + tests/json_echo/run-test.py \
> > > + tests/monitor/run-tests.sh \
> > > + tests/py/nft-test.py \
> > > + tests/shell/run-tests.sh
> > > +endif
> > > diff --git a/configure.ac b/configure.ac
> > > index da16a6e257c91..8073d4d8193e2 100644
> > > --- a/configure.ac
> > > +++ b/configure.ac
> > > @@ -155,6 +155,11 @@ AC_CONFIG_COMMANDS([nftversion.h], [
> > > AC_SUBST([MAKE_STAMP], ["\$(shell date +%s)"])
> > > CFLAGS="${CFLAGS} -DMAKE_STAMP=\${MAKE_STAMP}"
> > >
> > > +AC_ARG_ENABLE([distcheck],
> > > + AS_HELP_STRING([--enable-distcheck], [Build for distcheck]),
> > > + [enable_distcheck=yes], [])
> > > +AM_CONDITIONAL([BUILD_DISTCHECK], [test "x$enable_distcheck" = "xyes"])
> >
> > Oh no, with distcheck-hook: this is a lot cleaner.
>
> Hmm, I really don't see how it could be used for this purpose: It is
> called before starting the VPATH build, here's an excerpt:
>
> | mkdir nftables-1.1.5/_build nftables-1.1.5/_build/sub nftables-1.1.5/_inst
> | chmod a-w nftables-1.1.5
> | test -d nftables-1.1.5/_build || exit 0; \
> | dc_install_base=`CDPATH="${ZSH_VERSION+.}:" && cd nftables-1.1.5/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
> | && dc_destdir="${TMPDIR-/tmp}/am-dc-$$/" \
> | && make distcheck-hook \
> | && am__cwd=`pwd` \
> | && CDPATH="${ZSH_VERSION+.}:" && cd nftables-1.1.5/_build/sub \
> | && ../../configure \
> | --enable-distcheck \
> | \
> | --srcdir=../.. --prefix="$dc_install_base" \
> | && make \
> | && make dvi \
> | && make check \
>
> So by the time distcheck-hook runs, there is no Makefile(.in) I could
> modify, only the top-level ones (which are tracked in git). What am I
> missing here?
distcheck-hook: could set a env var so test just print a [SKIP].
Similar to your previous approach with the env var, but logic reversed.
next prev parent reply other threads:[~2025-09-04 16:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-03 17:22 [nft PATCH v3 00/11] Run all test suites via 'make check' Phil Sutter
2025-09-03 17:22 ` [nft PATCH v3 01/11] tests: monitor: Label diffs to help users Phil Sutter
2025-09-03 17:22 ` [nft PATCH v3 02/11] tests: monitor: Fix regex collecting expected echo output Phil Sutter
2025-09-03 17:22 ` [nft PATCH v3 03/11] tests: monitor: Test JSON echo mode as well Phil Sutter
2025-09-03 17:22 ` [nft PATCH v3 04/11] tests: monitor: Extend debug output a bit Phil Sutter
2025-09-03 17:22 ` [nft PATCH v3 05/11] tests: monitor: Excercise all syntaxes and variants by default Phil Sutter
2025-09-03 17:22 ` [nft PATCH v3 06/11] tests: py: Enable JSON and JSON schema " Phil Sutter
2025-09-04 15:24 ` Pablo Neira Ayuso
2025-09-03 17:22 ` [nft PATCH v3 07/11] tests: Prepare exit codes for automake Phil Sutter
2025-09-03 17:22 ` [nft PATCH v3 08/11] tests: json_echo: Skip if run as non-root Phil Sutter
2025-09-03 17:22 ` [nft PATCH v3 09/11] tests: shell: Skip packetpath/nat_ftp in fake root env Phil Sutter
2025-09-03 17:22 ` [nft PATCH v3 10/11] tests: build: Do not assume caller's CWD Phil Sutter
2025-09-03 17:22 ` [nft PATCH v3 11/11] Makefile: Enable support for 'make check' Phil Sutter
2025-09-04 15:24 ` Pablo Neira Ayuso
2025-09-04 15:25 ` Pablo Neira Ayuso
2025-09-04 15:32 ` Phil Sutter
2025-09-04 16:21 ` Phil Sutter
2025-09-04 16:57 ` Pablo Neira Ayuso [this message]
2025-09-04 18:39 ` Phil Sutter
2025-09-11 12:02 ` Phil Sutter
2025-09-11 15:13 ` Pablo Neira Ayuso
2025-09-04 15:15 ` [nft PATCH v3 00/11] Run all test suites via " Phil Sutter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aLnFEDmuqOckePL8@calendula \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=phil@nwl.cc \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox