[igt-dev] [PATCH i-g-t 09/11] testplan/meson.build: Validate documentation at build time

Mauro Carvalho Chehab mauro.chehab at linux.intel.com
Mon Mar 27 13:31:53 UTC 2023


From: Mauro Carvalho Chehab <mchehab at kernel.org>

If the tests are build too, check if the documentation match
the name of the tests.

Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>
---
 docs/testplan/meson.build | 8 ++++++--
 meson.build               | 1 +
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/docs/testplan/meson.build b/docs/testplan/meson.build
index fee568868167..d1ad6ea0461b 100644
--- a/docs/testplan/meson.build
+++ b/docs/testplan/meson.build
@@ -8,12 +8,16 @@ stylesheet = join_paths(meson.current_source_dir(), 'testplan.css')
 
 xe_test_config = join_paths(source_root, 'tests', 'xe', 'xe_test_config.json')
 
-if not build_tests
+check_testlist = ''
+if build_tests
+	# Check if documentation matches the actual tests
+	check_testlist = [ '--check-testlist', '--igt-build-path', build_root ]
+else
 	test_executables = []
 endif
 
 test_dict = { 'xe_tests':
-		{ 'input': xe_test_config, 'extra_args': [] }
+		{ 'input': xe_test_config, 'extra_args': check_testlist }
 	    }
 
 foreach testplan, fields: test_dict
diff --git a/meson.build b/meson.build
index 7360634fe199..bef590f465dc 100644
--- a/meson.build
+++ b/meson.build
@@ -15,6 +15,7 @@ endif
 
 # meson.source_root is marked as a future-deprecated feature
 source_root = meson.current_source_dir()
+build_root = meson.current_build_dir()
 
 cc = meson.get_compiler('c')
 
-- 
2.39.2



More information about the igt-dev mailing list