From 7dbb21e77ace03bf28dc9a6b37b43d551282389f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 20 Feb 2024 08:24:12 +0100 Subject: [PATCH] build/tests: Skip a test if the test requires it during inspection In case we don't have dependencies, we should skip the test, otherwise we can just fail at test time --- tests/meson.build | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/meson.build b/tests/meson.build index 8c8f5d07..dc3b70e2 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -100,11 +100,17 @@ if get_option('introspection') base_args = files(vdtest + '.py') suite = ['virtual-driver'] - r = run_command(unittest_inspector, files(vdtest + '.py'), check: true) + r = run_command(unittest_inspector, files(vdtest + '.py'), check: false) unit_tests = r.stdout().strip().split('\n') if r.returncode() == 0 and unit_tests.length() > 0 suite += vdtest + elif r.returncode() == 77 + test(vdtest, + sh, + args: ['-c', 'exit 77'] + ) + continue else unit_tests = [vdtest] endif