This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=57048fc8c3d0810091b73b444c1c42db1a665fb9 commit 57048fc8c3d0810091b73b444c1c42db1a665fb9 Author: Guillem Jover <[email protected]> AuthorDate: Mon May 20 12:20:33 2024 +0200 build: Fix test verbose and parallel option propagation Unify the handling of these flags in the automake fragment files instead of setting TESTSUITEFLAGS all over the place in addition to these flags for the various test suite drivers. --- .gitlab-ci.yml | 10 +++++----- build-aux/autotest.am | 9 +++++++++ build-aux/tap.am | 2 ++ debian/rules | 6 ++---- debian/tests/test-not-root | 2 +- debian/tests/test-root | 2 +- 6 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2565a91cd..b9b08710d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,7 @@ author-check: - eatmydata apt -P pkg.dpkg.author-testing build-dep -qq -y . - ./configure - make -j$(nproc) authorcheck - TESTSUITEFLAGS=--verbose TEST_PARALLEL=$(nproc) + TEST_VERBOSE=1 TEST_PARALLEL=$(nproc) # Test whether the unit tests pass. unit-tests: @@ -31,7 +31,7 @@ unit-tests: script: - ./configure --enable-compiler-sanitizer - make -j$(nproc) -C lib check - TESTSUITEFLAGS=--verbose TEST_PARALLEL=$(nproc) + TEST_VERBOSE=1 TEST_PARALLEL=$(nproc) # Test whether the unit tests pass on a VPATH build. vpath-tests: @@ -41,7 +41,7 @@ vpath-tests: - cd build-tree - ../configure - make -j$(nproc) check - TESTSUITEFLAGS=--verbose TEST_PARALLEL=$(nproc) + TEST_VERBOSE=1 TEST_PARALLEL=$(nproc) # Test whether the unit tests pass with minimal library dependencies. minlib-tests: @@ -55,7 +55,7 @@ minlib-tests: --without-libbz2 --without-libselinux - make -j$(nproc) check - TESTSUITEFLAGS=--verbose TEST_PARALLEL=$(nproc) + TEST_VERBOSE=1 TEST_PARALLEL=$(nproc) # Test whether we can build the shared library. shlib-tests: @@ -63,7 +63,7 @@ shlib-tests: script: - AUTHOR_TESTING=1 ./configure --enable-shared - make -j$(nproc) check - TESTSUITEFLAGS=--verbose TEST_PARALLEL=$(nproc) + TEST_VERBOSE=1 TEST_PARALLEL=$(nproc) # Test whether the functional tests pass. func-tests: diff --git a/build-aux/autotest.am b/build-aux/autotest.am index a4bb8ea54..19054c5fa 100644 --- a/build-aux/autotest.am +++ b/build-aux/autotest.am @@ -4,6 +4,15 @@ DISTCLEANFILES += at/atconfig AUTOTEST_DEPS = at/atconfig at/atlocal $(TESTSUITE) +TEST_VERBOSE ?= 0 +TEST_PARALLEL ?= 1 + +TEST_VERBOSE_OPT = $(TEST_VERBOSE:0=) + +TESTSUITEFLAGS = +TESTSUITEFLAGS += -j$(TEST_PARALLEL) +TESTSUITEFLAGS += $(TEST_VERBOSE_OPT:1=--verbose) + # The ":;" works around a Bash 3.2 bug when the output is not writable. $(srcdir)/at/package.m4: $(top_srcdir)/configure.ac :;{ \ diff --git a/build-aux/tap.am b/build-aux/tap.am index e2865309c..f05d4ba23 100644 --- a/build-aux/tap.am +++ b/build-aux/tap.am @@ -18,6 +18,8 @@ tap-clean: tap-check: $(test_data) $(test_programs) $(test_scripts) [ -z "$(test_tmpdir)" ] || $(MKDIR_P) $(test_tmpdir) $(TEST_ENV_VARS) \ + TEST_PARALLEL=$(TEST_PARALLEL) \ + TEST_VERBOSE=$(TEST_VERBOSE) \ abs_srcdir=$(abs_srcdir) \ abs_builddir=$(abs_builddir) \ abs_top_srcdir=$(abs_top_srcdir) \ diff --git a/debian/rules b/debian/rules index f4b923542..97dbc242c 100755 --- a/debian/rules +++ b/debian/rules @@ -26,18 +26,16 @@ ifeq ($(DEB_HOST_ARCH_OS),linux) confflags += --with-libselinux endif ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS))) - TESTSUITEFLAGS += --verbose + testflags += TEST_VERBOSE=1 endif # Enable parallel test suite NUMJOBS = 1 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - TESTSUITEFLAGS += -j$(NUMJOBS) + testflags += TEST_PARALLEL=$(NUMJOBS) endif -testflags = TESTSUITEFLAGS=$(TESTSUITEFLAGS) TEST_PARALLEL=$(NUMJOBS) - dpkg_vendor = \ $(CURDIR)/build-aux/run-script scripts/dpkg-vendor.pl diff --git a/debian/tests/test-not-root b/debian/tests/test-not-root index 7438d70b3..fbb23d687 100644 --- a/debian/tests/test-not-root +++ b/debian/tests/test-not-root @@ -18,4 +18,4 @@ cd $AUTOPKGTEST_TMP --sysconfdir=/etc \ --localstatedir=/var \ # EOL -make installcheck TESTSUITEFLAGS=--verbose +make installcheck TEST_VERBOSE=1 diff --git a/debian/tests/test-root b/debian/tests/test-root index f09da154b..033961933 100644 --- a/debian/tests/test-root +++ b/debian/tests/test-root @@ -18,4 +18,4 @@ cd $AUTOPKGTEST_TMP --sysconfdir=/etc \ --localstatedir=/var \ # EOL -make installcheck TESTSUITEFLAGS=--verbose +make installcheck TEST_VERBOSE=1 -- Dpkg.Org's dpkg

