All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] build: remove redundant 'check-build' make target
@ 2021-08-10 16:44 Daniel P. Berrangé
  2021-08-10 17:35 ` Willian Rampazzo
  2021-08-11  6:02 ` Thomas Huth
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel P. Berrangé @ 2021-08-10 16:44 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Daniel P. Berrangé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

The 'check-build' make target was added as a way to build all the unit
test binaries, since the standard 'all' target would not trigger this.

Since the switch to meson, however, 'all' will now include the 'test'
binaries. As a result, 'check-build' is a no-op:

   $ make all check-build
   ..snip lots of output...
   make: Nothing to be done for 'check-build'.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 .gitlab-ci.d/buildtest.yml           | 9 ---------
 .gitlab-ci.d/crossbuild-template.yml | 6 +++---
 tests/Makefile.include               | 3 ---
 3 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index 903ee65f32..a210d5f2e6 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -9,7 +9,6 @@ build-system-alpine:
     IMAGE: alpine
     TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
       microblazeel-softmmu mips64el-softmmu
-    MAKE_CHECK_ARGS: check-build
     CONFIGURE_ARGS: --enable-docs --enable-trace-backends=log,simple,syslog
   artifacts:
     expire_in: 2 days
@@ -44,7 +43,6 @@ build-system-ubuntu:
     CONFIGURE_ARGS: --enable-docs --enable-fdt=system --enable-slirp=system
     TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
       microblazeel-softmmu mips64el-softmmu
-    MAKE_CHECK_ARGS: check-build
   artifacts:
     expire_in: 2 days
     paths:
@@ -77,7 +75,6 @@ build-system-debian:
     CONFIGURE_ARGS: --enable-fdt=system
     TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
       riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
-    MAKE_CHECK_ARGS: check-build
   artifacts:
     expire_in: 2 days
     paths:
@@ -111,7 +108,6 @@ build-system-fedora:
              --enable-fdt=system --enable-slirp=system --enable-capstone=system
     TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
       xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
-    MAKE_CHECK_ARGS: check-build
   artifacts:
     expire_in: 2 days
     paths:
@@ -145,7 +141,6 @@ build-system-centos:
                     --enable-modules --enable-trace-backends=dtrace
     TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
       x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
-    MAKE_CHECK_ARGS: check-build
   artifacts:
     expire_in: 2 days
     paths:
@@ -177,7 +172,6 @@ build-system-opensuse:
     IMAGE: opensuse-leap
     CONFIGURE_ARGS: --enable-fdt=system
     TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
-    MAKE_CHECK_ARGS: check-build
   artifacts:
     expire_in: 2 days
     paths:
@@ -410,7 +404,6 @@ build-cfi-aarch64:
     CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
       --enable-safe-stack --enable-slirp=git
     TARGETS: aarch64-softmmu
-    MAKE_CHECK_ARGS: check-build
   timeout: 70m
   artifacts:
     expire_in: 2 days
@@ -452,7 +445,6 @@ build-cfi-ppc64-s390x:
     CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
       --enable-safe-stack --enable-slirp=git
     TARGETS: ppc64-softmmu s390x-softmmu
-    MAKE_CHECK_ARGS: check-build
   timeout: 70m
   artifacts:
     expire_in: 2 days
@@ -494,7 +486,6 @@ build-cfi-x86_64:
     CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
       --enable-safe-stack --enable-slirp=git
     TARGETS: x86_64-softmmu
-    MAKE_CHECK_ARGS: check-build
   timeout: 70m
   artifacts:
     expire_in: 2 days
diff --git a/.gitlab-ci.d/crossbuild-template.yml b/.gitlab-ci.d/crossbuild-template.yml
index 7d3ad00a1e..03a6d42980 100644
--- a/.gitlab-ci.d/crossbuild-template.yml
+++ b/.gitlab-ci.d/crossbuild-template.yml
@@ -10,7 +10,7 @@
         --disable-user --target-list-exclude="arm-softmmu cris-softmmu
           i386-softmmu microblaze-softmmu mips-softmmu mipsel-softmmu
           mips64-softmmu ppc-softmmu sh4-softmmu xtensa-softmmu"
-    - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
+    - make -j$(expr $(nproc) + 1) all $MAKE_CHECK_ARGS
     - if grep -q "EXESUF=.exe" config-host.mak;
       then make installer;
       version="$(git describe --match v[0-9]*)";
@@ -32,7 +32,7 @@
     - PKG_CONFIG_PATH=$PKG_CONFIG_PATH
       ../configure --enable-werror --disable-docs $QEMU_CONFIGURE_OPTS
         --disable-tools --enable-${ACCEL:-kvm} $EXTRA_CONFIGURE_OPTS
-    - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
+    - make -j$(expr $(nproc) + 1) all $MAKE_CHECK_ARGS
 
 .cross_user_build_job:
   stage: build
@@ -43,4 +43,4 @@
     - PKG_CONFIG_PATH=$PKG_CONFIG_PATH
       ../configure --enable-werror --disable-docs $QEMU_CONFIGURE_OPTS
         --disable-system
-    - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
+    - make -j$(expr $(nproc) + 1) all $MAKE_CHECK_ARGS
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 6e16c05f10..fa08bf3888 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -23,7 +23,6 @@ endif
 	@echo " $(MAKE) check-clean          Clean the tests and related data"
 	@echo
 	@echo "The following are useful for CI builds"
-	@echo " $(MAKE) check-build          Build most test binaris"
 	@echo " $(MAKE) get-vm-images        Downloads all images used by acceptance tests, according to configured targets (~350 MB each, 1.5 GB max)"
 	@echo
 	@echo
@@ -148,8 +147,6 @@ check-block: $(SRC_PATH)/tests/check-block.sh qemu-img$(EXESUF) \
 	@$<
 endif
 
-check-build: $(QEMU_IOTESTS_HELPERS-y)
-
 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] build: remove redundant 'check-build' make target
  2021-08-10 16:44 [PATCH] build: remove redundant 'check-build' make target Daniel P. Berrangé
@ 2021-08-10 17:35 ` Willian Rampazzo
  2021-08-11  6:02 ` Thomas Huth
  1 sibling, 0 replies; 4+ messages in thread
From: Willian Rampazzo @ 2021-08-10 17:35 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Thomas Huth, Alex Bennée, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé

On Tue, Aug 10, 2021 at 1:44 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> The 'check-build' make target was added as a way to build all the unit
> test binaries, since the standard 'all' target would not trigger this.
>
> Since the switch to meson, however, 'all' will now include the 'test'
> binaries. As a result, 'check-build' is a no-op:
>
>    $ make all check-build
>    ..snip lots of output...
>    make: Nothing to be done for 'check-build'.
>

Confirmed!

> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  .gitlab-ci.d/buildtest.yml           | 9 ---------
>  .gitlab-ci.d/crossbuild-template.yml | 6 +++---
>  tests/Makefile.include               | 3 ---
>  3 files changed, 3 insertions(+), 15 deletions(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>



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

* Re: [PATCH] build: remove redundant 'check-build' make target
  2021-08-10 16:44 [PATCH] build: remove redundant 'check-build' make target Daniel P. Berrangé
  2021-08-10 17:35 ` Willian Rampazzo
@ 2021-08-11  6:02 ` Thomas Huth
  2021-08-11  8:40   ` Daniel P. Berrangé
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Huth @ 2021-08-11  6:02 UTC (permalink / raw)
  To: Daniel P. Berrangé, qemu-devel, Paolo Bonzini
  Cc: Willian Rampazzo, Alex Bennée, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta

On 10/08/2021 18.44, Daniel P. Berrangé wrote:
> The 'check-build' make target was added as a way to build all the unit
> test binaries, since the standard 'all' target would not trigger this.
> 
> Since the switch to meson, however, 'all' will now include the 'test'
> binaries. As a result, 'check-build' is a no-op:
> 
>     $ make all check-build
>     ..snip lots of output...
>     make: Nothing to be done for 'check-build'.

I think it would be better to restore the previous behaviour, so that "all" 
does not build the test files by default. Most normal users don't need the 
tests, so compiling them by default wastes precious CPU cycles.

See also:

 
https://lore.kernel.org/qemu-devel/8d5714d1-d92b-60fc-531f-73eb05852c8f@gmail.com/

 
https://lore.kernel.org/qemu-devel/472c9809-8987-3c2c-c2b5-b99d637ace0f@redhat.com/

  Thomas




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

* Re: [PATCH] build: remove redundant 'check-build' make target
  2021-08-11  6:02 ` Thomas Huth
@ 2021-08-11  8:40   ` Daniel P. Berrangé
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel P. Berrangé @ 2021-08-11  8:40 UTC (permalink / raw)
  To: Thomas Huth
  Cc: qemu-devel, Wainer dos Santos Moschetta,
	Philippe Mathieu-Daudé,
	Willian Rampazzo, Paolo Bonzini, Alex Bennée

On Wed, Aug 11, 2021 at 08:02:44AM +0200, Thomas Huth wrote:
> On 10/08/2021 18.44, Daniel P. Berrangé wrote:
> > The 'check-build' make target was added as a way to build all the unit
> > test binaries, since the standard 'all' target would not trigger this.
> > 
> > Since the switch to meson, however, 'all' will now include the 'test'
> > binaries. As a result, 'check-build' is a no-op:
> > 
> >     $ make all check-build
> >     ..snip lots of output...
> >     make: Nothing to be done for 'check-build'.
> 
> I think it would be better to restore the previous behaviour, so that "all"
> does not build the test files by default. Most normal users don't need the
> tests, so compiling them by default wastes precious CPU cycles.

Building tests by default is a good idea. If I'm refactoring code I want
to see straight away if I've broken test binaries, just as much as if
I've broken a part of the emulator code. I wouldn't want QEMU to go back
to the old behaviour as IMHO that is broken.

If someone doesn't want to run tests in a particular scenario, then by
all means have a meson option to disable tests entirely - neither build
nor run them - which wouldn't require a target to trigger test builds
manually.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



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

end of thread, other threads:[~2021-08-11  8:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 16:44 [PATCH] build: remove redundant 'check-build' make target Daniel P. Berrangé
2021-08-10 17:35 ` Willian Rampazzo
2021-08-11  6:02 ` Thomas Huth
2021-08-11  8:40   ` Daniel P. Berrangé

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.