diff mbox series

[v1,2/5] tests/migration: Make initrd-stress.img built by default

Message ID 7134ee3f7632b0454ef287301bda6c4faeb1d473.1723189080.git.yong.huang@smartx.com (mailing list archive)
State New, archived
Headers show
Series Guestperf: miscellaneous refinement and enrichment | expand

Commit Message

Yong Huang Aug. 9, 2024, 7:43 a.m. UTC
From: Hyman Huang <yong.huang@smartx.com>

The initrd-stress.img was compiled by specifying the
target, to make it easier for developers to play the
guestperf tool, make it built by default.

Signed-off-by: Hyman Huang <yong.huang@smartx.com>
---
 tests/migration/meson.build | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Daniel P. Berrangé Aug. 9, 2024, 8:34 a.m. UTC | #1
On Fri, Aug 09, 2024 at 03:43:33PM +0800, yong.huang@smartx.com wrote:
> From: Hyman Huang <yong.huang@smartx.com>
> 
> The initrd-stress.img was compiled by specifying the
> target, to make it easier for developers to play the
> guestperf tool, make it built by default.

If you're going to do this, then you will need to make sure it is only
built on a Linux host, and when glib static & sysprof are found. eg

  if host_os == 'linux' && glib_static.found() && sysprof.found()

> 
> Signed-off-by: Hyman Huang <yong.huang@smartx.com>
> ---
>  tests/migration/meson.build | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/migration/meson.build b/tests/migration/meson.build
> index a91aa61c65..393e401800 100644
> --- a/tests/migration/meson.build
> +++ b/tests/migration/meson.build
> @@ -7,12 +7,13 @@ stress = executable(
>    files('stress.c'),
>    dependencies: [glib_static, sysprof],
>    link_args: ['-static'],
> -  build_by_default: false,
> +  build_by_default: true,
>  )
>  
>  custom_target(
>    'initrd-stress.img',
>    output: 'initrd-stress.img',
>    input: stress,
> -  command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@']
> +  command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@'],
> +  build_by_default: true,
>  )
> -- 
> 2.11.0
> 
> 

With regards,
Daniel
Yong Huang Aug. 9, 2024, 9 a.m. UTC | #2
On Fri, Aug 9, 2024 at 4:34 PM Daniel P. Berrangé <berrange@redhat.com>
wrote:

> On Fri, Aug 09, 2024 at 03:43:33PM +0800, yong.huang@smartx.com wrote:
> > From: Hyman Huang <yong.huang@smartx.com>
> >
> > The initrd-stress.img was compiled by specifying the
> > target, to make it easier for developers to play the
> > guestperf tool, make it built by default.
>
> If you're going to do this, then you will need to make sure it is only
> built on a Linux host, and when glib static & sysprof are found. eg
>
>   if host_os == 'linux' && glib_static.found() && sysprof.found()


Ok, thanks for the comments, I'll add the check in the next version.


>
>
>
> > Signed-off-by: Hyman Huang <yong.huang@smartx.com>
> > ---
> >  tests/migration/meson.build | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/tests/migration/meson.build b/tests/migration/meson.build
> > index a91aa61c65..393e401800 100644
> > --- a/tests/migration/meson.build
> > +++ b/tests/migration/meson.build
> > @@ -7,12 +7,13 @@ stress = executable(
> >    files('stress.c'),
> >    dependencies: [glib_static, sysprof],
> >    link_args: ['-static'],
> > -  build_by_default: false,
> > +  build_by_default: true,
> >  )
> >
> >  custom_target(
> >    'initrd-stress.img',
> >    output: 'initrd-stress.img',
> >    input: stress,
> > -  command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@']
> > +  command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@'],
> > +  build_by_default: true,
> >  )
> > --
> > 2.11.0
> >
> >
>
> With 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 :|
>
>
Fabiano Rosas Aug. 9, 2024, 12:59 p.m. UTC | #3
yong.huang@smartx.com writes:

> From: Hyman Huang <yong.huang@smartx.com>
>
> The initrd-stress.img was compiled by specifying the
> target, to make it easier for developers to play the
> guestperf tool, make it built by default.
>
> Signed-off-by: Hyman Huang <yong.huang@smartx.com>
> ---
>  tests/migration/meson.build | 5 +++--

This could have moved along with the rest of guestperf. There's already
a scripts/meson.build where these could go.
diff mbox series

Patch

diff --git a/tests/migration/meson.build b/tests/migration/meson.build
index a91aa61c65..393e401800 100644
--- a/tests/migration/meson.build
+++ b/tests/migration/meson.build
@@ -7,12 +7,13 @@  stress = executable(
   files('stress.c'),
   dependencies: [glib_static, sysprof],
   link_args: ['-static'],
-  build_by_default: false,
+  build_by_default: true,
 )
 
 custom_target(
   'initrd-stress.img',
   output: 'initrd-stress.img',
   input: stress,
-  command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@']
+  command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@'],
+  build_by_default: true,
 )