Hi Jan, On Tue, 25 Feb 2025 at 18:11, Jan Kiszka <jan.kis...@siemens.com> wrote: > > On 25.02.25 19:02, Christopher Obbard wrote: > > For some builds, e.g. inside a minimal buildroot image, we may not want the > > tests to be built. Add an option --disable-tests to configure to disable > > building the tests. > > Now playing with it again: tests are only build if explicitly requested > (make check), not via plain "make". What exactly is the problem you are > facing in that case?
Thanks for that hint. Hmm, I am building efibootguard with buildroot using the autoconf built-in abstraction (not entirely sure what commands it is calling under the hood), which builds the tests (linking to check and lots of other things). When building the host tools, building the tests causes some additional dependencies. So I am disabling the building of the tests to workaround needing to package more things in buildroot. I guess I need to check if/how buildroot is calling "make check" in my efibootguard package. Again: buildroot is something I don't know well enough, but know enough to cause trouble ;-). > Jan > > PS: "make dist" is broken :( > > > > > Signed-off-by: Christopher Obbard <christopher.obb...@linaro.org> > > --- > > Changes in v2: > > - Remove re-definition of EXTRA_DIST (thanks Jan). > > - Rework confusing comment around SUBDIRS. > > - Link to v1: https://groups.google.com/g/efibootguard-dev/c/tBKE9qT2hSo > > --- > > Makefile.am | 8 ++++++-- > > configure.ac | 12 +++++++++++- > > tools/tests/Makefile.am | 3 +++ > > 3 files changed, 20 insertions(+), 3 deletions(-) > > > > diff --git a/Makefile.am b/Makefile.am > > index > > bb97df255dfb9c8a145eba3ed8dcc58ab9bd124b..911112da9d19bc97d248912fe394a89d85732fe4 > > 100644 > > --- a/Makefile.am > > +++ b/Makefile.am > > @@ -369,8 +369,12 @@ clean-local-completion-pycache: > > > > check-valgrind-local: $(GEN_VERSION_H) > > > > -# Tests depend on libraries being built - start with "." > > -SUBDIRS = . tools/tests > > +SUBDIRS = . > > + > > +# Only include tools/tests if tests are enabled > > +if BUILD_TESTS > > +SUBDIRS += tools/tests > > +endif > > > > FORCE: > > > > diff --git a/configure.ac b/configure.ac > > index > > 36fc8d55e4190766871b8f9b5ea5bbaff5e24dde..6bfc1ec295666137bf2fff00608f296ba67b4336 > > 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -281,6 +281,12 @@ AS_IF([test "x$enable_completion" != "xno"], > > ]) > > AM_CONDITIONAL([COMPLETION], [test "x$enable_completion" != "xno"]) > > > > +AC_ARG_ENABLE([tests], > > + [AS_HELP_STRING([--disable-tests], [Disable building tests])], > > + [], [enable_tests=yes]) > > + > > +AM_CONDITIONAL([BUILD_TESTS], [test "x$enable_tests" != "xno"]) > > + > > AX_VALGRIND_DFLT(memcheck, on) > > AX_VALGRIND_DFLT(helgrind, off) > > AX_VALGRIND_DFLT(drd, off) > > @@ -290,10 +296,14 @@ AX_VALGRIND_CHECK > > # > > ------------------------------------------------------------------------------ > > AC_CONFIG_FILES([ > > Makefile > > - tools/tests/Makefile > > libebgenv.pc > > ]) > > > > +# Only configure tools/tests/Makefile if tests are enabled > > +if test "x$enable_tests" != "xno"; then > > + AC_CONFIG_FILES([tools/tests/Makefile]) > > +fi > > + > > AC_OUTPUT > > AC_MSG_RESULT([ > > $PACKAGE_NAME $VERSION > > diff --git a/tools/tests/Makefile.am b/tools/tests/Makefile.am > > index > > d3fa5368c99f0b484fbb6fd57b848c581957aaef..7e3ac1e74b3456950033daa2586e60bea5913e0b > > 100644 > > --- a/tools/tests/Makefile.am > > +++ b/tools/tests/Makefile.am > > @@ -11,6 +11,7 @@ > > # > > # SPDX-License-Identifier: GPL-2.0-only > > # > > +if BUILD_TESTS > > > > OBJCOPY ?= objcopy > > > > @@ -110,3 +111,5 @@ test_fat_LDADD = $(FAT_TESTLIB) $(LIBCHECK_LIBS) > > TESTS = $(check_PROGRAMS) > > > > @VALGRIND_CHECK_RULES@ > > + > > +endif > > > > --- > > base-commit: 452020920b3fe00ae0e2dc9d06f103107ded15c4 > > change-id: 20250224-wip-obbardc-disable-tests-fd6857b8ee49 > > > > Best regards, > > -- > Siemens AG, Foundational Technologies > Linux Expert Center -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to efibootguard-dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/efibootguard-dev/CACr-zFA6A0ZEFhxxWbfTAe2B12k%2BUdReATQ8YJeU893x4j4rOg%40mail.gmail.com.