build: remove redundant 'check-build' make target
PATCH 1/1 build: remove redundant 'check-build' make target
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'.
--- .gitlab-ci.d/buildtest.yml | 9 --------- .gitlab-ci.d/crossbuild-template.yml | 6 +++--- tests/Makefile.include | 3 --- 3 files changed, 3 insertions(+), 15 deletions(-)
.gitlab-ci.d/buildtest.yml +0 -9
@@ -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
.gitlab-ci.d/crossbuild-template.yml +3 -3
@@ -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
tests/Makefile.include +0 -3
@@ -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)
Signature · 1 line
2.31.1
Quoted 11 lines · Daniel P. Berrangé
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!
Quoted 7 lines
Signed-off-by Daniel P. Berrangé <[email protected]>--- .gitlab-ci.d/buildtest.yml | 9 --------- .gitlab-ci.d/crossbuild-template.yml | 6 +++--- tests/Makefile.include | 3 --- 3 files changed, 3 insertions(+), 15 deletions(-)
Quoted 9 lines · Daniel P. Berrangé
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/[email protected]/
https://lore.kernel.org/qemu-devel/[email protected]/
Thomas
Quoted 7 lines · Thomas Huth
Quoted 6 lines · Daniel P. Berrangé
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:
Quoted 7 lines
Quoted 3 lines
$ 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
Signature · 3 lines
|: 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 :|