Note: In case the tests are not really suitable to be run on a
single-cpu system, it would make sense not to run them at all,
which would be easy to do in debian/rules using nproc and a simple
ifeq/ifneq.

If you decide to do that (or even if not), I suggest that you simplify
debian/rules a little bit first (see attached patch). By putting the
ifneq inside override_dh_auto_test (not the other way around), we can
save the "else" and the extra override_dh_auto_test empty target.

While we are at it, debhelper compat 13 has a feature which might
make the HOME trick I see in debian/rules not to be necessary anymore.
See debhelper(7) for details.

Thanks.
commit bf0e5b5d76a22b425ce4b7bc2a94ff4d2751b42c
Author: Santiago Vila <[email protected]>
Date:   Fri Sep 4 01:16:14 2026 +0200

    Simplify override_dh_auto_test target.

diff --git a/debian/rules b/debian/rules
index 6beb8900..c68fb566 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,17 +20,14 @@ override_dh_autoreconf:
        # to re-generate them.
        touch doc/man/*.1 doc/man/*.3 doc/man/*.8
 
+override_dh_auto_test:
 # Only run the test suite on architectures with reasonnably fast builders
 ifneq (,$(filter $(DEB_HOST_ARCH_CPU), amd64 arm64 ppc64el i386))
-override_dh_auto_test:
        # The test suite requires a writable home directory to test
        # the lttng cli and sbuild sets this to a non-existent directory.
        # Workaround by creating a temporary writeable home dir.
        mkdir "$(CURDIR)/debian/home"
        HOME="$(CURDIR)/debian/home" dh_auto_test
-else
-# Disable the test suite
-override_dh_auto_test:
 endif
 
 override_dh_auto_install:

Reply via email to