[igt-dev] [PATCH i-g-t v2] testplan/meson.build: only run igt_runner if it is compiled
Mauro Carvalho Chehab
mauro.chehab at linux.intel.com
Tue Apr 4 07:08:44 UTC 2023
From: Mauro Carvalho Chehab <mchehab at kernel.org>
While the runner is built by default, if jsonc is not found, it
won't be build. This will cause the documentation validation test
to cause the build to fail.
Prevent that by adding an extra check if jsonc is found, as this
is the same condition that it is used to build igt_runner.
While here, also ensure that igt_doc.py will depend on having the
igt_runner already compiled, when the --check option is used.
Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>
---
v2:
- add a dependency for the runner binary when --check option is
used.
docs/testplan/meson.build | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/docs/testplan/meson.build b/docs/testplan/meson.build
index 4c67ec42fc69..b8f94f1d74fb 100644
--- a/docs/testplan/meson.build
+++ b/docs/testplan/meson.build
@@ -9,9 +9,11 @@ stylesheet = join_paths(meson.current_source_dir(), 'testplan.css')
xe_test_config = join_paths(source_root, 'tests', 'xe', 'xe_test_config.json')
check_testlist = []
-if build_tests
+doc_dependencies = test_executables
+if build_tests and jsonc.found()
# Check if documentation matches the actual tests
check_testlist = [ '--check-testlist', '--igt-build-path', build_root ]
+ doc_dependencies += runner
else
test_executables = []
endif
@@ -24,7 +26,7 @@ foreach testplan, fields: test_dict
rst = custom_target(testplan + '.rst',
build_by_default : true,
command : [ igt_doc_script, '--config', '@INPUT@', '--rest', '@OUTPUT@' ] + fields['extra_args'],
- depends : test_executables,
+ depends : doc_dependencies,
input : fields['input'],
output : testplan + '.rst'
)
--
2.39.2
More information about the igt-dev
mailing list