From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PATCH v2 3/4] tests/docker: allow display of docker output
Date: Tue, 10 Feb 2026 16:35:55 +0000 [thread overview]
Message-ID: <20260210163556.713841-4-berrange@redhat.com> (raw)
In-Reply-To: <20260210163556.713841-1-berrange@redhat.com>
The --quiet command is used with docker unless V=1 is passed to make,
and as a result stdout from docker is never visible by default, making
it hard to diagnose failures building / running containers.
Meanwhile passing V=1 is undesirable as that makes the entire build
system verbose.
Introduce a $(DOCKER_V) make variable which is initialized from $(V)
It is thus possible to display docker output without also enabling
make verbose output.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
tests/docker/Makefile.include | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 7d4582b6a8..df14538c0f 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -23,6 +23,8 @@ RUNC ?= $(shell $(DOCKER_SCRIPT) probe)
CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$)
DOCKER_SRC_COPY := $(BUILD_DIR)/docker-src.$(CUR_TIME)
+DOCKER_V ?= $(V)
+
.DELETE_ON_ERROR: $(DOCKER_SRC_COPY)
$(DOCKER_SRC_COPY):
@mkdir $@
@@ -40,14 +42,14 @@ docker-qemu-src: $(DOCKER_SRC_COPY)
docker-image-%: $(DOCKER_FILES_DIR)/%.docker
$(call quiet-command, \
DOCKER_BUILDKIT=1 $(RUNC) build \
- $(if $V,,--quiet) \
+ $(if $(DOCKER_V),,--quiet) \
$(if $(NOCACHE),--no-cache, \
$(if $(DOCKER_REGISTRY),--cache-from $(DOCKER_REGISTRY)/qemu/$*)) \
--build-arg BUILDKIT_INLINE_CACHE=1 \
$(if $(NOUSER),, \
--build-arg USER=$(USER) \
--build-arg UID=$(UID)) \
- -t qemu/$* - < $< $(if $V,,> /dev/null),\
+ -t qemu/$* - < $< $(if $(DOCKER_V),,> /dev/null),\
"BUILD", $*)
# General rule for inspecting registry images.
@@ -73,7 +75,7 @@ docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker
DEB_TYPE=$(DEB_TYPE) \
$(if $(DEB_URL),DEB_URL=$(DEB_URL),) \
$(DOCKER_SCRIPT) build -t qemu/debian-$* -f $< \
- $(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \
+ $(if $(DOCKER_V),,--quiet) $(if $(NOCACHE),--no-cache) \
$(if $(NOUSER),,--add-current-user) \
$(if $(EXTRA_FILES),--extra-files $(EXTRA_FILES)) \
$(if $(EXECUTABLE),--include-executable=$(EXECUTABLE)), \
@@ -105,16 +107,17 @@ debian-toolchain-run = \
$(if $(NOCACHE)$(NOFETCH), \
$(call quiet-command, \
$(DOCKER_SCRIPT) build -t qemu/$1 -f $< \
- $(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \
+ $(if $(DOCKER_V),,--quiet) \
+ $(if $(NOCACHE),--no-cache) \
--registry $(DOCKER_REGISTRY) --extra-files \
$(DOCKER_FILES_DIR)/$1.d/build-toolchain.sh, \
"BUILD", $1), \
$(call quiet-command, \
- $(DOCKER_SCRIPT) fetch $(if $V,,--quiet) \
+ $(DOCKER_SCRIPT) fetch $(if $(DOCKER_V),,--quiet) \
qemu/$1 $(DOCKER_REGISTRY), \
"FETCH", $1) \
$(call quiet-command, \
- $(DOCKER_SCRIPT) update $(if $V,,--quiet) \
+ $(DOCKER_SCRIPT) update $(if $(DOCKER_V),,--quiet) \
qemu/$1 \
$(if $(NOUSER),,--add-current-user) \
"PREPARE", $1))
@@ -231,7 +234,10 @@ docker-run: docker-qemu-src
-e TARGET_LIST=$(subst $(SPACE),$(COMMA),$(TARGET_LIST)) \
-e EXTRA_CONFIGURE_OPTS="$(EXTRA_CONFIGURE_OPTS)" \
-e TEST_COMMAND="$(TEST_COMMAND)" \
- -e V=$V -e J=$J -e DEBUG=$(DEBUG) \
+ -e V=$V \
+ -e DOCKER_V=$(DOCKER_V) \
+ -e J=$J \
+ -e DEBUG=$(DEBUG) \
-e SHOW_ENV=$(SHOW_ENV) \
$(if $(NOUSER),, \
-v $(DOCKER_QEMU_CACHE_DIR):$(DOCKER_QEMU_CACHE_DIR) \
--
2.53.0
next prev parent reply other threads:[~2026-02-10 16:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-10 16:35 [PATCH v2 0/4] tests/docker: improve detection of docker/podman Daniel P. Berrangé
2026-02-10 16:35 ` [PATCH v2 1/4] tests/docker: improve handling of docker probes Daniel P. Berrangé
2026-02-10 16:35 ` [PATCH v2 2/4] tests/docker: add support for podman remote access Daniel P. Berrangé
2026-03-02 7:51 ` Thomas Huth
2026-07-09 14:48 ` Pierrick Bouvier
2026-07-09 15:40 ` Daniel P. Berrangé
2026-07-09 15:55 ` Pierrick Bouvier
2026-07-09 16:01 ` Daniel P. Berrangé
2026-07-09 16:04 ` Pierrick Bouvier
2026-07-09 16:15 ` Daniel P. Berrangé
2026-07-09 16:13 ` Daniel P. Berrangé
2026-07-09 16:24 ` Pierrick Bouvier
2026-07-10 8:06 ` Daniel P. Berrangé
2026-07-10 11:47 ` Alex Bennée
2026-07-10 11:52 ` Daniel P. Berrangé
2026-07-10 18:20 ` Pierrick Bouvier
2026-07-13 8:32 ` Daniel P. Berrangé
2026-07-13 16:01 ` Pierrick Bouvier
2026-02-10 16:35 ` Daniel P. Berrangé [this message]
2026-03-02 8:07 ` [PATCH v2 3/4] tests/docker: allow display of docker output Thomas Huth
2026-07-10 11:36 ` Alex Bennée
2026-02-10 16:35 ` [PATCH v2 4/4] gitlab: ensure docker output is always displayed in CI Daniel P. Berrangé
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=20260210163556.713841-4-berrange@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.