]> xenbits.xensource.com Git - people/aperard/libvirt.git/commitdiff
rpcgen: Skip tests if tests are disabled
authorAndrea Bolognani <abologna@redhat.com>
Wed, 29 Nov 2023 16:43:16 +0000 (17:43 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 1 Dec 2023 12:50:16 +0000 (13:50 +0100)
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
scripts/rpcgen/meson.build

index d8d0e037845641d27ed60b7ffe3bb623c479cdab..9e766a2a376ac21efb1d9ec9fd224c2c111f32d0 100644 (file)
@@ -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')