[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 2/5] tests/migration: Make initrd-stress.img built by default
From: |
yong . huang |
Subject: |
[PATCH v3 2/5] tests/migration: Make initrd-stress.img built by default |
Date: |
Tue, 22 Oct 2024 10:14:23 +0800 |
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 when dependencies suffices.
Signed-off-by: Hyman Huang <yong.huang@smartx.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
---
tests/migration/meson.build | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)
diff --git a/tests/migration/meson.build b/tests/migration/meson.build
index a91aa61c65..e10acbe317 100644
--- a/tests/migration/meson.build
+++ b/tests/migration/meson.build
@@ -2,17 +2,21 @@ sysprof = dependency('sysprof-capture-4', method:
'pkg-config', required: false)
glib_static = dependency('glib-2.0', version: glib_req_ver, required: false,
method: 'pkg-config', static: true)
-stress = executable(
- 'stress',
- files('stress.c'),
- dependencies: [glib_static, sysprof],
- link_args: ['-static'],
- build_by_default: false,
-)
-custom_target(
- 'initrd-stress.img',
- output: 'initrd-stress.img',
- input: stress,
- command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@']
-)
+if host_os == 'linux' and sysprof.found() and glib_static.found()
+ stress = executable(
+ 'stress',
+ files('stress.c'),
+ dependencies: [glib_static, sysprof],
+ link_args: ['-static'],
+ )
+
+ custom_target(
+ 'initrd-stress.img',
+ output: 'initrd-stress.img',
+ input: stress,
+ command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@'],
+ build_by_default: true,
+ depends: [stress],
+ )
+endif
--
2.27.0
- [PATCH v3 0/5] Guestperf: miscellaneous refinement and enrichment, yong . huang, 2024/10/21
- [PATCH v3 1/5] tests/migration: Move the guestperf tool to scripts directory, yong . huang, 2024/10/21
- [PATCH v3 2/5] tests/migration: Make initrd-stress.img built by default,
yong . huang <=
- [PATCH v3 3/5] guestperf: Support deferred migration for multifd, yong . huang, 2024/10/21
- [PATCH v3 4/5] guestperf: Nitpick the inconsistent parameters, yong . huang, 2024/10/21
- [PATCH v3 5/5] guestperf: Introduce multifd compression option, yong . huang, 2024/10/21
- Re: [PATCH v3 0/5] Guestperf: miscellaneous refinement and enrichment, Fabiano Rosas, 2024/10/23