qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/4] Allow tests to be disabled
@ 2024-01-17 12:32 Manolo de Medici
  2024-01-17 17:35 ` Peter Maydell
  0 siblings, 1 reply; 6+ messages in thread
From: Manolo de Medici @ 2024-01-17 12:32 UTC (permalink / raw)
  To: qemu-devel, bug-hurd

tests/qtest/tpm-* compilation is not disabled by disable-tpm,
for this reason compilation fails on systems that doesn't
support the linux/bsd TPM api. Fix this by allowing tests
to be disabled.

Signed-off-by: Manolo de Medici <manolo.demedici@gmail.com>
---
 configure | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/configure b/configure
index 21ab9a64e9..c36ce1f7e2 100755
--- a/configure
+++ b/configure
@@ -254,6 +254,7 @@ skip_meson=no
 use_containers="yes"
 gdb_bin=$(command -v "gdb-multiarch" || command -v "gdb")
 gdb_arches=""
+tests="auto"

 # Don't accept a target_list environment variable.
 unset target_list
@@ -741,6 +742,10 @@ for opt do
   ;;
   --disable-cfi) cfi=false
   ;;
+  --disable-tests) tests="disabled"
+  ;;
+  --enable-tests) tests="enabled"
+  ;;
   --disable-download) download="disabled"; git_submodules_action=validate;
   ;;
   --enable-download) download="enabled"; git_submodules_action=update;
@@ -887,6 +892,7 @@ cat << EOF
   linux-user      all linux usermode emulation targets
   bsd-user        all BSD usermode emulation targets
   pie             Position Independent Executables
+  tests           build tests

 NOTE: The object files are built at the place where configure is launched
 EOF
@@ -1792,6 +1798,7 @@ if test "$skip_meson" = no; then
   # QEMU options
   test "$cfi" != false && meson_option_add "-Dcfi=$cfi" "-Db_lto=$cfi"
   test "$docs" != auto && meson_option_add "-Ddocs=$docs"
+  test "$tests" != auto && meson_option_add "-Dtests=$tests"
   test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add
"-Dfuzzing_engine=$LIB_FUZZING_ENGINE"
   test "$plugins" = yes && meson_option_add "-Dplugins=true"
   test "$tcg" != enabled && meson_option_add "-Dtcg=$tcg"
--
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH 3/4] Allow tests to be disabled
@ 2024-01-17 12:32 Manolo de Medici
  2024-01-17 15:09 ` Manolo de Medici
  0 siblings, 1 reply; 6+ messages in thread
From: Manolo de Medici @ 2024-01-17 12:32 UTC (permalink / raw)
  To: qemu-devel, bug-hurd

tests/qtest/tpm-* compilation is not disabled by disable-tpm,
for this reason compilation fails on systems that doesn't
support the linux/bsd TPM api. Fix this by allowing tests
to be disabled.

Signed-off-by: Manolo de Medici <manolo.demedici@gmail.com>
---
 configure | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/configure b/configure
index 21ab9a64e9..c36ce1f7e2 100755
--- a/configure
+++ b/configure
@@ -254,6 +254,7 @@ skip_meson=no
 use_containers="yes"
 gdb_bin=$(command -v "gdb-multiarch" || command -v "gdb")
 gdb_arches=""
+tests="auto"

 # Don't accept a target_list environment variable.
 unset target_list
@@ -741,6 +742,10 @@ for opt do
   ;;
   --disable-cfi) cfi=false
   ;;
+  --disable-tests) tests="disabled"
+  ;;
+  --enable-tests) tests="enabled"
+  ;;
   --disable-download) download="disabled"; git_submodules_action=validate;
   ;;
   --enable-download) download="enabled"; git_submodules_action=update;
@@ -887,6 +892,7 @@ cat << EOF
   linux-user      all linux usermode emulation targets
   bsd-user        all BSD usermode emulation targets
   pie             Position Independent Executables
+  tests           build tests

 NOTE: The object files are built at the place where configure is launched
 EOF
@@ -1792,6 +1798,7 @@ if test "$skip_meson" = no; then
   # QEMU options
   test "$cfi" != false && meson_option_add "-Dcfi=$cfi" "-Db_lto=$cfi"
   test "$docs" != auto && meson_option_add "-Ddocs=$docs"
+  test "$tests" != auto && meson_option_add "-Dtests=$tests"
   test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add
"-Dfuzzing_engine=$LIB_FUZZING_ENGINE"
   test "$plugins" = yes && meson_option_add "-Dplugins=true"
   test "$tcg" != enabled && meson_option_add "-Dtcg=$tcg"
--
2.43.0

root@hurd:~/qemu# cat 0004-Add-the-GNU-Hurd-as-a-target-host.patch
From 5d7bf83c00168cede72a03d87d7546a0018b82a5 Mon Sep 17 00:00:00 2001
Message-ID: <5d7bf83c00168cede72a03d87d7546a0018b82a5.1705439227.git.manolo.demedici@gmail.com>
In-Reply-To: <cover.1705439227.git.manolo.demedici@gmail.com>
References: <cover.1705439227.git.manolo.demedici@gmail.com>
From: Manolo de Medici <manolo.demedici@gmail.com>
Date: Tue, 16 Jan 2024 20:12:50 +0100
Subject: [PATCH 4/4] Add the GNU/Hurd as a target host

Signed-off-by: Manolo de Medici <manolo.demedici@gmail.com>
---
 configure | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure b/configure
index c36ce1f7e2..d4648af96a 100755
--- a/configure
+++ b/configure
@@ -354,6 +354,8 @@ elif check_define __NetBSD__; then
   host_os=netbsd
 elif check_define __APPLE__; then
   host_os=darwin
+elif check_define __GNU__; then
+  host_os=hurd
 else
   # This is a fatal error, but don't report it yet, because we
   # might be going to just print the --help text, or it might
--
2.43.0


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

end of thread, other threads:[~2024-01-17 18:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-17 12:32 [PATCH 3/4] Allow tests to be disabled Manolo de Medici
2024-01-17 17:35 ` Peter Maydell
2024-01-17 18:14   ` Manolo de Medici
2024-01-17 18:40     ` Alex Bennée
  -- strict thread matches above, loose matches on Subject: below --
2024-01-17 12:32 Manolo de Medici
2024-01-17 15:09 ` Manolo de Medici

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).