All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH  v1 0/2] meson fixups for check-tcg/softfloat
@ 2021-01-26 14:53 Alex Bennée
  2021-01-26 14:53 ` [PATCH v1 1/2] scripts/mtest2make.py: export all-%s-targets variable and use it Alex Bennée
  2021-01-26 14:53 ` [PATCH v1 2/2] tests/Makefile.include: don't use TARGET_DIRS for check-tcg Alex Bennée
  0 siblings, 2 replies; 4+ messages in thread
From: Alex Bennée @ 2021-01-26 14:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alex Bennée, f4bug

Hi,

These 2 patches build on Phillipe's meson clean-ups to stop breakage
occurring with --disable-tcg builds.

Based-on: 20210122204441.2145197-1-philmd@redhat.com

Alex Bennée (2):
  scripts/mtest2make.py: export all-%s-targets variable and use it
  tests/Makefile.include: don't use TARGET_DIRS for check-tcg

 Makefile               | 3 +++
 scripts/mtest2make.py  | 1 +
 tests/Makefile.include | 9 ++++-----
 3 files changed, 8 insertions(+), 5 deletions(-)

-- 
2.20.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v1 1/2] scripts/mtest2make.py: export all-%s-targets variable and use it
  2021-01-26 14:53 [PATCH v1 0/2] meson fixups for check-tcg/softfloat Alex Bennée
@ 2021-01-26 14:53 ` Alex Bennée
  2021-01-26 14:53 ` [PATCH v1 2/2] tests/Makefile.include: don't use TARGET_DIRS for check-tcg Alex Bennée
  1 sibling, 0 replies; 4+ messages in thread
From: Alex Bennée @ 2021-01-26 14:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Cleber Rosa, Alex Bennée, f4bug, Eduardo Habkost

There are some places where the conditional makefile support is the
simplest solution. Now we don't expose CONFIG_TCG as a variable create
a new one that can be checked for the check-help output.

As check-tcg is a PHONY target we re-use check-softfloat to gate that
as well.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 scripts/mtest2make.py  | 1 +
 tests/Makefile.include | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/mtest2make.py b/scripts/mtest2make.py
index 25ee6887cf..cbbcba100d 100644
--- a/scripts/mtest2make.py
+++ b/scripts/mtest2make.py
@@ -110,6 +110,7 @@ def emit_suite(name, suite, prefix):
     print('ifneq ($(filter %s %s, $(MAKECMDGOALS)),)' % (target, prefix))
     print('.tests += $(.test.$(SPEED).%s)' % (target, ))
     print('endif')
+    print('all-%s-targets += %s' % (prefix, target))
 
 targets = {t['id']: [os.path.relpath(f) for f in t['filename']]
            for t in introspect['targets']}
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 3a0524ce74..3ce8b03f34 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -12,7 +12,7 @@ check-help:
 	@echo " $(MAKE) check-speed          Run qobject speed tests"
 	@echo " $(MAKE) check-qapi-schema    Run QAPI schema tests"
 	@echo " $(MAKE) check-block          Run block tests"
-ifeq ($(CONFIG_TCG),y)
+ifneq ($(filter $(all-check-targets), check-softfloat),)
 	@echo " $(MAKE) check-tcg            Run TCG tests"
 	@echo " $(MAKE) check-softfloat      Run FPU emulation tests"
 endif
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v1 2/2] tests/Makefile.include: don't use TARGET_DIRS for check-tcg
  2021-01-26 14:53 [PATCH v1 0/2] meson fixups for check-tcg/softfloat Alex Bennée
  2021-01-26 14:53 ` [PATCH v1 1/2] scripts/mtest2make.py: export all-%s-targets variable and use it Alex Bennée
@ 2021-01-26 14:53 ` Alex Bennée
  2021-01-26 15:48   ` Paolo Bonzini
  1 sibling, 1 reply; 4+ messages in thread
From: Alex Bennée @ 2021-01-26 14:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Alex Bennée, f4bug

TARGET_DIRS reflects what we wanted to configure which in the normal
case is all our targets. However once meson has pared-down our target
list due to missing features we need to check the final list of
ninja-targets. This prevents check-tcg barfing on a --disable-tcg
build.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 Makefile               | 3 +++
 tests/Makefile.include | 7 +++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index a380bbfa12..a25b2a5431 100644
--- a/Makefile
+++ b/Makefile
@@ -174,6 +174,9 @@ ifneq ($(filter $(ninja-targets), $(ninja-cmd-goals)),)
 endif
 endif
 
+# Build up our target list from the filtered list of ninja targets
+TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa, $(ninja-targets)))
+
 # Force configure to re-run if the API symbols are updated
 ifeq ($(CONFIG_PLUGIN),y)
 config-host.mak: $(SRC_PATH)/plugins/qemu-plugins.symbols
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 3ce8b03f34..ee438f8d6d 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -41,10 +41,9 @@ SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
 SPEED = quick
 
 # Per guest TCG tests
-
-BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TARGET_DIRS))
-CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(TARGET_DIRS))
-RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TARGET_DIRS))
+BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TARGETS))
+CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(TARGETS))
+RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TARGETS))
 
 # Probe for the Docker Builds needed for each build
 $(foreach PROBE_TARGET,$(TARGET_DIRS), 				\
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 2/2] tests/Makefile.include: don't use TARGET_DIRS for check-tcg
  2021-01-26 14:53 ` [PATCH v1 2/2] tests/Makefile.include: don't use TARGET_DIRS for check-tcg Alex Bennée
@ 2021-01-26 15:48   ` Paolo Bonzini
  0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2021-01-26 15:48 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel; +Cc: f4bug

On 26/01/21 15:53, Alex Bennée wrote:
> TARGET_DIRS reflects what we wanted to configure which in the normal
> case is all our targets. However once meson has pared-down our target
> list due to missing features we need to check the final list of
> ninja-targets. This prevents check-tcg barfing on a --disable-tcg
> build.
> 
> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   Makefile               | 3 +++
>   tests/Makefile.include | 7 +++----
>   2 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index a380bbfa12..a25b2a5431 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -174,6 +174,9 @@ ifneq ($(filter $(ninja-targets), $(ninja-cmd-goals)),)
>   endif
>   endif
>   
> +# Build up our target list from the filtered list of ninja targets
> +TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa, $(ninja-targets)))

I wouldn't mind having this directly in tests/Makefile.include, if you 
don't expect any other uses.

Apart from this nit, series

Acked-by: Paolo Bonzini <pbonzini@redhat.com>

Paolo

>   # Force configure to re-run if the API symbols are updated
>   ifeq ($(CONFIG_PLUGIN),y)
>   config-host.mak: $(SRC_PATH)/plugins/qemu-plugins.symbols
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index 3ce8b03f34..ee438f8d6d 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -41,10 +41,9 @@ SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
>   SPEED = quick
>   
>   # Per guest TCG tests
> -
> -BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TARGET_DIRS))
> -CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(TARGET_DIRS))
> -RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TARGET_DIRS))
> +BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TARGETS))
> +CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(TARGETS))
> +RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TARGETS))
>   
>   # Probe for the Docker Builds needed for each build
>   $(foreach PROBE_TARGET,$(TARGET_DIRS), 				\
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-26 15:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-26 14:53 [PATCH v1 0/2] meson fixups for check-tcg/softfloat Alex Bennée
2021-01-26 14:53 ` [PATCH v1 1/2] scripts/mtest2make.py: export all-%s-targets variable and use it Alex Bennée
2021-01-26 14:53 ` [PATCH v1 2/2] tests/Makefile.include: don't use TARGET_DIRS for check-tcg Alex Bennée
2021-01-26 15:48   ` 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.