* [PATCH 0/2] build: fix "make check" without earlier "make"
@ 2021-10-06 9:38 Paolo Bonzini
2021-10-06 9:38 ` [PATCH 1/2] tests: add missing dependency for check-block Paolo Bonzini
2021-10-06 9:38 ` [PATCH 2/2] build: fix "make check" without earlier "make" Paolo Bonzini
0 siblings, 2 replies; 4+ messages in thread
From: Paolo Bonzini @ 2021-10-06 9:38 UTC (permalink / raw)
To: qemu-devel; +Cc: thuth
"make check" without a previous "make" will not build the tools
needed by qemu-iotests. This happens because "make check-block"
does not do the Makefile magic that causes ninja to build the
test dependencies.
This could be fixed by making qemu-iotests a Meson test, which is
coming indeed; but in the meanwhile copy the mechanism used by
Makefile.mtest, just adapted to check-block's dependencies.
Paolo
Paolo Bonzini (2):
tests: add missing dependency for check-block
build: fix "make check" without earlier "make"
tests/Makefile.include | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
--
2.31.1
From 8e37969c681d61d4581e5985eb9c76e509e79089 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Wed, 6 Oct 2021 04:33:15 -0400
Subject: [PATCH 1/2] tests: add missing dependency for check-block
qemu-iotests run qemu-storage-daemon, make sure it is up to date.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
tests/Makefile.include | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 7426522bbe..b42fd06462 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -152,6 +152,7 @@ QEMU_IOTESTS_HELPERS-$(CONFIG_LINUX) = tests/qemu-iotests/socket_scm_helper$(EXE
check: check-block
export PYTHON
check-block: $(SRC_PATH)/tests/check-block.sh qemu-img$(EXESUF) \
+ storage-daemon/qemu-storage-daemon$(EXESUF) \
qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) \
$(filter qemu-system-%, $(ninja-targets))
@$<
--
2.31.1
From a54fdbd52f33ad82ea96bbe8be8c5ec0c3e415b2 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Wed, 6 Oct 2021 04:18:27 -0400
Subject: [PATCH 2/2] build: fix "make check" without earlier "make"
"make check", if not preceded by "make", will not build the tools
needed by qemu-iotests. This happens because qemu-iotests, aka
"make check-block", is not yet part of meson.build.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
tests/Makefile.include | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index b42fd06462..38af790e5c 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -151,14 +151,22 @@ ifeq ($(CONFIG_TOOLS)$(CONFIG_POSIX),yy)
QEMU_IOTESTS_HELPERS-$(CONFIG_LINUX) = tests/qemu-iotests/socket_scm_helper$(EXESUF)
check: check-block
export PYTHON
-check-block: $(SRC_PATH)/tests/check-block.sh qemu-img$(EXESUF) \
- storage-daemon/qemu-storage-daemon$(EXESUF) \
- qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) \
- $(filter qemu-system-%, $(ninja-targets))
+
+ifneq ($(filter check check-block check-build, $(MAKECMDGOALS)),)
+ninja-cmd-goals += \
+ qemu-img$(EXESUF) \
+ qemu-io$(EXESUF) \
+ qemu-nbd$(EXESUF) \
+ storage-daemon/qemu-storage-daemon$(EXESUF) \
+ $(QEMU_IOTESTS_HELPERS-y) \
+ $(filter qemu-system-%, $(ninja-targets))
+endif
+
+check-block: $(SRC_PATH)/tests/check-block.sh run-ninja
@$<
endif
-check-build: $(QEMU_IOTESTS_HELPERS-y)
+check-build: run-ninja
check-clean:
rm -rf $(TESTS_VENV_DIR) $(TESTS_RESULTS_DIR)
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 1/2] tests: add missing dependency for check-block
2021-10-06 9:38 [PATCH 0/2] build: fix "make check" without earlier "make" Paolo Bonzini
@ 2021-10-06 9:38 ` Paolo Bonzini
2021-10-06 11:14 ` Philippe Mathieu-Daudé
2021-10-06 9:38 ` [PATCH 2/2] build: fix "make check" without earlier "make" Paolo Bonzini
1 sibling, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2021-10-06 9:38 UTC (permalink / raw)
To: qemu-devel; +Cc: thuth
qemu-iotests run qemu-storage-daemon, make sure it is up to date.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
tests/Makefile.include | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 7426522bbe..b42fd06462 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -152,6 +152,7 @@ QEMU_IOTESTS_HELPERS-$(CONFIG_LINUX) = tests/qemu-iotests/socket_scm_helper$(EXE
check: check-block
export PYTHON
check-block: $(SRC_PATH)/tests/check-block.sh qemu-img$(EXESUF) \
+ storage-daemon/qemu-storage-daemon$(EXESUF) \
qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) \
$(filter qemu-system-%, $(ninja-targets))
@$<
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] build: fix "make check" without earlier "make"
2021-10-06 9:38 [PATCH 0/2] build: fix "make check" without earlier "make" Paolo Bonzini
2021-10-06 9:38 ` [PATCH 1/2] tests: add missing dependency for check-block Paolo Bonzini
@ 2021-10-06 9:38 ` Paolo Bonzini
1 sibling, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2021-10-06 9:38 UTC (permalink / raw)
To: qemu-devel; +Cc: thuth
"make check", if not preceded by "make", will not build the tools
needed by qemu-iotests. This happens because qemu-iotests, aka
"make check-block", is not yet part of meson.build.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
tests/Makefile.include | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index b42fd06462..38af790e5c 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -151,14 +151,22 @@ ifeq ($(CONFIG_TOOLS)$(CONFIG_POSIX),yy)
QEMU_IOTESTS_HELPERS-$(CONFIG_LINUX) = tests/qemu-iotests/socket_scm_helper$(EXESUF)
check: check-block
export PYTHON
-check-block: $(SRC_PATH)/tests/check-block.sh qemu-img$(EXESUF) \
- storage-daemon/qemu-storage-daemon$(EXESUF) \
- qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) \
- $(filter qemu-system-%, $(ninja-targets))
+
+ifneq ($(filter check check-block check-build, $(MAKECMDGOALS)),)
+ninja-cmd-goals += \
+ qemu-img$(EXESUF) \
+ qemu-io$(EXESUF) \
+ qemu-nbd$(EXESUF) \
+ storage-daemon/qemu-storage-daemon$(EXESUF) \
+ $(QEMU_IOTESTS_HELPERS-y) \
+ $(filter qemu-system-%, $(ninja-targets))
+endif
+
+check-block: $(SRC_PATH)/tests/check-block.sh run-ninja
@$<
endif
-check-build: $(QEMU_IOTESTS_HELPERS-y)
+check-build: run-ninja
check-clean:
rm -rf $(TESTS_VENV_DIR) $(TESTS_RESULTS_DIR)
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] tests: add missing dependency for check-block
2021-10-06 9:38 ` [PATCH 1/2] tests: add missing dependency for check-block Paolo Bonzini
@ 2021-10-06 11:14 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-10-06 11:14 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: thuth
On 10/6/21 11:38, Paolo Bonzini wrote:
> qemu-iotests run qemu-storage-daemon, make sure it is up to date.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> tests/Makefile.include | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index 7426522bbe..b42fd06462 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -152,6 +152,7 @@ QEMU_IOTESTS_HELPERS-$(CONFIG_LINUX) = tests/qemu-iotests/socket_scm_helper$(EXE
> check: check-block
> export PYTHON
> check-block: $(SRC_PATH)/tests/check-block.sh qemu-img$(EXESUF) \
> + storage-daemon/qemu-storage-daemon$(EXESUF) \
Finally, thanks.
https://www.mail-archive.com/qemu-devel@nongnu.org/msg747467.html
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-06 11:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06 9:38 [PATCH 0/2] build: fix "make check" without earlier "make" Paolo Bonzini
2021-10-06 9:38 ` [PATCH 1/2] tests: add missing dependency for check-block Paolo Bonzini
2021-10-06 11:14 ` Philippe Mathieu-Daudé
2021-10-06 9:38 ` [PATCH 2/2] build: fix "make check" without earlier "make" Paolo Bonzini
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.