qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] allow disabling tests
@ 2022-02-28 15:59 Simeon Schaub
  2022-02-28 16:16 ` Peter Maydell
  2022-02-28 16:19 ` Daniel P. Berrangé
  0 siblings, 2 replies; 6+ messages in thread
From: Simeon Schaub @ 2022-02-28 15:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

From b6ec17a85a8fb2431545f9c5093dbce9a090b522 Mon Sep 17 00:00:00 2001
From: Simeon David Schaub <schaub@mit.edu>
Date: Mon, 28 Feb 2022 10:51:04 -0500
Subject: [PATCH] allow disabling tests

Adds an option to avoid running tests as part of the build process. I
ran `make update-buildoptions` to update the meson options, but this
seemed to also change the `qga-vss` option. I assume this isn't intended
to happen, any ideas what's going on there?

Signed-off-by: Simeon David Schaub <schaub@mit.edu>
---
 meson.build                   | 4 +++-
 meson_options.txt             | 3 +++
 scripts/meson-buildoptions.sh | 5 ++++-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index 8df40bfac4..8b5935447a 100644
--- a/meson.build
+++ b/meson.build
@@ -3308,7 +3308,9 @@ subdir('scripts')
 subdir('tools')
 subdir('pc-bios')
 subdir('docs')
-subdir('tests')
+if get_option('tests')
+  subdir('tests')
+endif
 if gtk.found()
   subdir('po')
 endif
diff --git a/meson_options.txt b/meson_options.txt
index 52b11cead4..6527a5a368 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -270,3 +270,6 @@ option('profiler', type: 'boolean', value: false,
        description: 'profiler support')
 option('slirp_smbd', type : 'feature', value : 'auto',
        description: 'use smbd (at path --smbd=*) in slirp networking')
+
+option('tests', type : 'boolean', value : true,
+       description: 'run QEMU tests as part of the build process')
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 9ee684ef03..9271324c6a 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -20,7 +20,6 @@ meson_options_help() {
   printf "%s\n" '  --enable-malloc=CHOICE   choose memory allocator to
use [system] (choices:'
   printf "%s\n" '                           jemalloc/system/tcmalloc)'
   printf "%s\n" '  --enable-profiler        profiler support'
-  printf "%s\n" '  --enable-qga-vss         build QGA VSS support'
   printf "%s\n" '  --enable-qom-cast-debug  cast debugging support'
   printf "%s\n" '  --enable-rng-none        dummy RNG, avoid using
/dev/(u)random and'
   printf "%s\n" '                           getrandom()'
@@ -28,6 +27,7 @@ meson_options_help() {
   printf "%s\n" '                           (choices:
auto/disabled/enabled/internal/system)'
   printf "%s\n" '  --enable-strip           Strip targets on install'
   printf "%s\n" '  --enable-tcg-interpreter TCG with bytecode
interpreter (slow)'
+  printf "%s\n" '  --disable-tests          run QEMU tests as part of
the build process'
   printf "%s\n" '  --enable-trace-backends=CHOICE'
   printf "%s\n" '                           Set available tracing
backends [log] (choices:'
   printf "%s\n" '
dtrace/ftrace/log/nop/simple/syslog/ust)'
@@ -97,6 +97,7 @@ meson_options_help() {
   printf "%s\n" '  parallels       parallels image format support'
   printf "%s\n" '  qcow1           qcow1 image format support'
   printf "%s\n" '  qed             qed image format support'
+  printf "%s\n" '  qga-vss         build QGA VSS support (broken with
MinGW)'
   printf "%s\n" '  rbd             Ceph block device driver'
   printf "%s\n" '  replication     replication support'
   printf "%s\n" '  sdl             SDL user interface'
@@ -322,6 +323,8 @@ _meson_option_parse() {
     --disable-tcg) printf "%s" -Dtcg=disabled ;;
     --enable-tcg-interpreter) printf "%s" -Dtcg_interpreter=true ;;
     --disable-tcg-interpreter) printf "%s" -Dtcg_interpreter=false ;;
+    --enable-tests) printf "%s" -Dtests=true ;;
+    --disable-tests) printf "%s" -Dtests=false ;;
     --enable-tools) printf "%s" -Dtools=enabled ;;
     --disable-tools) printf "%s" -Dtools=disabled ;;
     --enable-tpm) printf "%s" -Dtpm=enabled ;;
-- 
2.35.1


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

* Re: [PATCH] allow disabling tests
  2022-02-28 15:59 [PATCH] allow disabling tests Simeon Schaub
@ 2022-02-28 16:16 ` Peter Maydell
  2022-02-28 16:22   ` Simeon Schaub
  2022-02-28 16:19 ` Daniel P. Berrangé
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2022-02-28 16:16 UTC (permalink / raw)
  To: Simeon Schaub; +Cc: qemu-trivial, qemu-devel

On Mon, 28 Feb 2022 at 16:10, Simeon Schaub <schaub@mit.edu> wrote:
>
> From b6ec17a85a8fb2431545f9c5093dbce9a090b522 Mon Sep 17 00:00:00 2001
> From: Simeon David Schaub <schaub@mit.edu>
> Date: Mon, 28 Feb 2022 10:51:04 -0500
> Subject: [PATCH] allow disabling tests
>
> Adds an option to avoid running tests as part of the build process. I
> ran `make update-buildoptions` to update the meson options, but this
> seemed to also change the `qga-vss` option. I assume this isn't intended
> to happen, any ideas what's going on there?

What tests are we running as part of the build process?
I wouldn't expect us to run any tests unless you ask for them
by running "make check".

We *build* the testcase binaries as part of the build process, which
perhaps is what you're running into ?

thanks
-- PMM


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

* Re: [PATCH] allow disabling tests
  2022-02-28 15:59 [PATCH] allow disabling tests Simeon Schaub
  2022-02-28 16:16 ` Peter Maydell
@ 2022-02-28 16:19 ` Daniel P. Berrangé
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel P. Berrangé @ 2022-02-28 16:19 UTC (permalink / raw)
  To: Simeon Schaub; +Cc: qemu-trivial, qemu-devel

On Mon, Feb 28, 2022 at 10:59:24AM -0500, Simeon Schaub wrote:
> From b6ec17a85a8fb2431545f9c5093dbce9a090b522 Mon Sep 17 00:00:00 2001
> From: Simeon David Schaub <schaub@mit.edu>
> Date: Mon, 28 Feb 2022 10:51:04 -0500
> Subject: [PATCH] allow disabling tests
> 
> Adds an option to avoid running tests as part of the build process.

We don't run tests as part of the build process

We /compile/ tests, but running them requires an explicit call
to 'make check'.

Can you give more info on the problem you had ? Presumably it
was related to compilation rather than running tests ?

>                                                                     I
> ran `make update-buildoptions` to update the meson options, but this
> seemed to also change the `qga-vss` option. I assume this isn't intended
> to happen, any ideas what's going on there?
> 
> Signed-off-by: Simeon David Schaub <schaub@mit.edu>
> ---
>  meson.build                   | 4 +++-
>  meson_options.txt             | 3 +++
>  scripts/meson-buildoptions.sh | 5 ++++-
>  3 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 8df40bfac4..8b5935447a 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -3308,7 +3308,9 @@ subdir('scripts')
>  subdir('tools')
>  subdir('pc-bios')
>  subdir('docs')
> -subdir('tests')
> +if get_option('tests')
> +  subdir('tests')
> +endif
>  if gtk.found()
>    subdir('po')
>  endif
> diff --git a/meson_options.txt b/meson_options.txt
> index 52b11cead4..6527a5a368 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -270,3 +270,6 @@ option('profiler', type: 'boolean', value: false,
>         description: 'profiler support')
>  option('slirp_smbd', type : 'feature', value : 'auto',
>         description: 'use smbd (at path --smbd=*) in slirp networking')
> +
> +option('tests', type : 'boolean', value : true,
> +       description: 'run QEMU tests as part of the build process')
> diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
> index 9ee684ef03..9271324c6a 100644
> --- a/scripts/meson-buildoptions.sh
> +++ b/scripts/meson-buildoptions.sh
> @@ -20,7 +20,6 @@ meson_options_help() {
>    printf "%s\n" '  --enable-malloc=CHOICE   choose memory allocator to
> use [system] (choices:'
>    printf "%s\n" '                           jemalloc/system/tcmalloc)'
>    printf "%s\n" '  --enable-profiler        profiler support'
> -  printf "%s\n" '  --enable-qga-vss         build QGA VSS support'
>    printf "%s\n" '  --enable-qom-cast-debug  cast debugging support'
>    printf "%s\n" '  --enable-rng-none        dummy RNG, avoid using
> /dev/(u)random and'
>    printf "%s\n" '                           getrandom()'
> @@ -28,6 +27,7 @@ meson_options_help() {
>    printf "%s\n" '                           (choices:
> auto/disabled/enabled/internal/system)'
>    printf "%s\n" '  --enable-strip           Strip targets on install'
>    printf "%s\n" '  --enable-tcg-interpreter TCG with bytecode
> interpreter (slow)'
> +  printf "%s\n" '  --disable-tests          run QEMU tests as part of
> the build process'
>    printf "%s\n" '  --enable-trace-backends=CHOICE'
>    printf "%s\n" '                           Set available tracing
> backends [log] (choices:'
>    printf "%s\n" '
> dtrace/ftrace/log/nop/simple/syslog/ust)'
> @@ -97,6 +97,7 @@ meson_options_help() {
>    printf "%s\n" '  parallels       parallels image format support'
>    printf "%s\n" '  qcow1           qcow1 image format support'
>    printf "%s\n" '  qed             qed image format support'
> +  printf "%s\n" '  qga-vss         build QGA VSS support (broken with
> MinGW)'
>    printf "%s\n" '  rbd             Ceph block device driver'
>    printf "%s\n" '  replication     replication support'
>    printf "%s\n" '  sdl             SDL user interface'
> @@ -322,6 +323,8 @@ _meson_option_parse() {
>      --disable-tcg) printf "%s" -Dtcg=disabled ;;
>      --enable-tcg-interpreter) printf "%s" -Dtcg_interpreter=true ;;
>      --disable-tcg-interpreter) printf "%s" -Dtcg_interpreter=false ;;
> +    --enable-tests) printf "%s" -Dtests=true ;;
> +    --disable-tests) printf "%s" -Dtests=false ;;
>      --enable-tools) printf "%s" -Dtools=enabled ;;
>      --disable-tools) printf "%s" -Dtools=disabled ;;
>      --enable-tpm) printf "%s" -Dtpm=enabled ;;
> -- 
> 2.35.1
> 

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] 6+ messages in thread

* Re: [PATCH] allow disabling tests
  2022-02-28 16:16 ` Peter Maydell
@ 2022-02-28 16:22   ` Simeon Schaub
  2022-02-28 16:25     ` Peter Maydell
  0 siblings, 1 reply; 6+ messages in thread
From: Simeon Schaub @ 2022-02-28 16:22 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-trivial, qemu-devel

Ah, yes, sorry, I didn't check whether the tests were actually run. I
can rename this to something more like `build-tests` if you think that's
more informative.

Best,
Simeon

On 2/28/22 11:16, Peter Maydell wrote:
> On Mon, 28 Feb 2022 at 16:10, Simeon Schaub <schaub@mit.edu> wrote:
>>
>> From b6ec17a85a8fb2431545f9c5093dbce9a090b522 Mon Sep 17 00:00:00 2001
>> From: Simeon David Schaub <schaub@mit.edu>
>> Date: Mon, 28 Feb 2022 10:51:04 -0500
>> Subject: [PATCH] allow disabling tests
>>
>> Adds an option to avoid running tests as part of the build process. I
>> ran `make update-buildoptions` to update the meson options, but this
>> seemed to also change the `qga-vss` option. I assume this isn't intended
>> to happen, any ideas what's going on there?
> 
> What tests are we running as part of the build process?
> I wouldn't expect us to run any tests unless you ask for them
> by running "make check".
> 
> We *build* the testcase binaries as part of the build process, which
> perhaps is what you're running into ?
> 
> thanks
> -- PMM


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

* Re: [PATCH] allow disabling tests
  2022-02-28 16:22   ` Simeon Schaub
@ 2022-02-28 16:25     ` Peter Maydell
  2022-02-28 17:28       ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2022-02-28 16:25 UTC (permalink / raw)
  To: Simeon Schaub; +Cc: qemu-trivial, qemu-devel

On Mon, 28 Feb 2022 at 16:22, Simeon Schaub <schaub@mit.edu> wrote:
>
> Ah, yes, sorry, I didn't check whether the tests were actually run. I
> can rename this to something more like `build-tests` if you think that's
> more informative.

What problem are you trying to solve here ? It shouldn't
matter whether we build the test binaries or not...

-- PMM


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

* Re: [PATCH] allow disabling tests
  2022-02-28 16:25     ` Peter Maydell
@ 2022-02-28 17:28       ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-02-28 17:28 UTC (permalink / raw)
  To: Peter Maydell, Simeon Schaub; +Cc: qemu-trivial, qemu-devel

On 28/2/22 17:25, Peter Maydell wrote:
> On Mon, 28 Feb 2022 at 16:22, Simeon Schaub <schaub@mit.edu> wrote:
>>
>> Ah, yes, sorry, I didn't check whether the tests were actually run. I
>> can rename this to something more like `build-tests` if you think that's
>> more informative.
> 
> What problem are you trying to solve here ? It shouldn't
> matter whether we build the test binaries or not...

Maybe speeding up the build by restricting to compiling what is required
(and saving energy), similar to 
https://lore.kernel.org/qemu-devel/20220204152924.6253-3-f4bug@amsat.org/ ?


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

end of thread, other threads:[~2022-02-28 17:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-28 15:59 [PATCH] allow disabling tests Simeon Schaub
2022-02-28 16:16 ` Peter Maydell
2022-02-28 16:22   ` Simeon Schaub
2022-02-28 16:25     ` Peter Maydell
2022-02-28 17:28       ` Philippe Mathieu-Daudé
2022-02-28 16:19 ` Daniel P. Berrangé

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).