[PATCH 06/12] tests: build 'virsh' before running virsh-auth test

Daniel P. Berrangé posted 12 patches 1 year, 9 months ago
[PATCH 06/12] tests: build 'virsh' before running virsh-auth test
Posted by Daniel P. Berrangé 1 year, 9 months ago
The 'virsh-auth' test needs to be able to invoke the 'virsh' binary

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/meson.build | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/tests/meson.build b/tests/meson.build
index 73b87be2a0..68fe00d0c1 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -720,17 +720,23 @@ if conf.has('WITH_LIBVIRTD')
   )
 
   test_scripts += [
-    'virsh-auth',
+      { 'name': 'virsh-auth', 'depends': [virsh_prog] }
   ]
 
   if conf.has('WITH_SECDRIVER_APPARMOR')
-    test_scripts += 'virt-aa-helper-test'
+    test_scripts += { 'name': 'virt-aa-helper-test' }
   endif
 endif
 
-foreach name : test_scripts
-  script = find_program(name)
-  test(name, script, env: tests_env, suite: 'script')
+foreach data : test_scripts
+  script = find_program(data['name'])
+  test(data['name'],
+       script,
+       env: tests_env,
+       depends: [
+           data.get('depends', []),
+       ],
+       suite: 'script')
 endforeach
 
 testenv = runutf8
-- 
2.43.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [PATCH 06/12] tests: build 'virsh' before running virsh-auth test
Posted by Peter Krempa 1 year, 9 months ago
On Tue, May 07, 2024 at 14:59:01 +0100, Daniel P. Berrangé wrote:
> The 'virsh-auth' test needs to be able to invoke the 'virsh' binary
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  tests/meson.build | 16 +++++++++++-----
>  1 file changed, 11 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/meson.build b/tests/meson.build
> index 73b87be2a0..68fe00d0c1 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -720,17 +720,23 @@ if conf.has('WITH_LIBVIRTD')
>    )
>  
>    test_scripts += [
> -    'virsh-auth',
> +      { 'name': 'virsh-auth', 'depends': [virsh_prog] }

In few places I've checked we use '[ DEPNAME ]' instead of the
compressed variant.
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org