From: Andrea Bolognani Date: Wed, 29 Nov 2023 16:43:16 +0000 (+0100) Subject: rpcgen: Skip tests if tests are disabled X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=233e74e3bf484166d670acc1d037ea6e7ba9036b;p=people%2Faperard%2Flibvirt.git rpcgen: Skip tests if tests are disabled Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- diff --git a/scripts/rpcgen/meson.build b/scripts/rpcgen/meson.build index d8d0e03784..9e766a2a37 100644 --- a/scripts/rpcgen/meson.build +++ b/scripts/rpcgen/meson.build @@ -1,15 +1,18 @@ subdir('rpcgen') -subdir('tests') -if pytest_prog.found() - test( - 'rpcgen-pytest', - python3_prog, - args: [ '-mpytest' ] + rpcgen_tests, - env: runutf8, - workdir: meson.current_source_dir(), - suite: 'script', - ) +if tests_enabled[0] + subdir('tests') + + if pytest_prog.found() + test( + 'rpcgen-pytest', + python3_prog, + args: [ '-mpytest' ] + rpcgen_tests, + env: runutf8, + workdir: meson.current_source_dir(), + suite: 'script', + ) + endif endif rpcgen_prog = find_program('main.py')