From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 12/18] testplan/meson.build: add targets to build Xe test documentation
Date: Fri, 10 Mar 2023 09:23:20 +0100 [thread overview]
Message-ID: <20230310082326.12088-13-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20230310082326.12088-1-zbigniew.kempczynski@intel.com>
From: Mauro Carvalho Chehab <mchehab@kernel.org>
Produce documentation from igt_doc.py markups inside the Xe driver
at build time.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Acked-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
docs/testplan/meson.build | 59 +++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
create mode 100644 docs/testplan/meson.build
diff --git a/docs/testplan/meson.build b/docs/testplan/meson.build
new file mode 100644
index 0000000000..11c0857330
--- /dev/null
+++ b/docs/testplan/meson.build
@@ -0,0 +1,59 @@
+testplan_title = 'IGT test plans'
+
+build_testplan = get_option('testplan')
+build_sphinx = get_option('sphinx')
+
+rst2html = find_program('rst2html-3', 'rst2html', required : build_testplan)
+sphinx = find_program('sphinx-build', required: build_sphinx)
+
+stylesheet = meson.current_source_dir() + '/testplan.css'
+
+test_dict = { 'xe_tests': {
+ 'input': xe_test_config, 'extra_args': []
+ }
+ }
+
+if igt_doc_script.found()
+ 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,
+ input : fields['input'],
+ output : testplan + '.rst'
+ )
+
+ if rst2html.found()
+ custom_target(testplan + '.html',
+ build_by_default : true,
+ command : [ rst2html, '--stylesheet=' + stylesheet, '--field-name-limit=0', '@INPUT@', '@OUTPUT@' ],
+ input : rst,
+ output : testplan + '.html'
+ )
+ endif
+ endforeach
+endif
+
+if sphinx.found()
+ if gen_rst_index.found()
+ sphinx_out_dir = meson.current_build_dir()+ '/indexed_html'
+
+ index_rst = custom_target('index.rst',
+ build_by_default : true,
+ command : [ gen_rst_index, testplan_title, test_dict.keys(), meson.current_build_dir()],
+ input : rst,
+ output : 'index.rst'
+ )
+
+ custom_target('index.html',
+ build_by_default : true,
+ command : [ 'sphinx-build', '-c', meson.current_source_dir(), meson.current_build_dir(), sphinx_out_dir],
+ input : index_rst,
+ output : 'index.html'
+ )
+ endif
+endif
+
+build_info += 'Build ReST test documentation: @0@'.format(igt_doc_script.found())
+build_info += 'Build simple html testplan documentation: @0@'.format(rst2html.found())
+build_info += 'Build indexed html testplan documentation: @0@'.format(sphinx.found())
--
2.34.1
next prev parent reply other threads:[~2023-03-10 8:24 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 8:23 [igt-dev] [PATCH i-g-t 00/18] Add igt_doc.py Zbigniew Kempczyński
2023-03-10 8:23 ` [igt-dev] [PATCH i-g-t 01/18] scripts/igt_doc.py: beautify its code Zbigniew Kempczyński
2023-03-10 8:23 ` [igt-dev] [PATCH i-g-t 02/18] scripts/igt_doc.py: add JSON file output Zbigniew Kempczyński
2023-03-10 8:23 ` [igt-dev] [PATCH i-g-t 03/18] scripts/igt_doc.py: dynamically create fields array from a JSON file Zbigniew Kempczyński
2023-03-10 8:23 ` [igt-dev] [PATCH i-g-t 04/18] scripts/igt_doc.py: add support to specify numeric values Zbigniew Kempczyński
2023-03-10 8:23 ` [igt-dev] [PATCH i-g-t 05/18] scripts/igt_doc.py: improve --show-subtests logic Zbigniew Kempczyński
2023-03-10 8:23 ` [igt-dev] [PATCH i-g-t 06/18] scripts/igt_doc.py: add error handler for subprocess Zbigniew Kempczyński
2023-03-10 8:23 ` [igt-dev] [PATCH i-g-t 07/18] scripts/igt_doc.py: improve multi-line logic Zbigniew Kempczyński
2023-03-10 8:23 ` [igt-dev] [PATCH i-g-t 08/18] scripts/igt_doc.py: don't use ":=" operator Zbigniew Kempczyński
2023-03-10 8:23 ` [igt-dev] [PATCH i-g-t 09/18] scripts/igt_doc.py: make it compatible with Python 3.6 Zbigniew Kempczyński
2023-03-10 8:23 ` [igt-dev] [PATCH i-g-t 10/18] scripts/igt_doc.py: sets the minimal version to run the script Zbigniew Kempczyński
2023-03-10 8:23 ` [igt-dev] [PATCH i-g-t 11/18] scripts/igt_doc.py: use a different logic to get IGT prefix Zbigniew Kempczyński
2023-03-10 8:23 ` Zbigniew Kempczyński [this message]
2023-03-10 8:23 ` [igt-dev] [PATCH i-g-t 13/18] xe/xe_test_config.json: cleanup the field struct Zbigniew Kempczyński
2023-03-10 8:23 ` [igt-dev] [PATCH i-g-t 14/18] xe/xe_huc_copy: add GPU dependency to its documentation Zbigniew Kempczyński
2023-03-10 8:23 ` [igt-dev] [PATCH i-g-t 15/18] xe/xe_*: add TEST/SUBTEST documentation Zbigniew Kempczyński
2023-03-10 8:23 ` [igt-dev] [PATCH i-g-t 16/18] xe-fast-feedback.testlist: update debugfs tests Zbigniew Kempczyński
2023-03-10 8:23 ` [igt-dev] [PATCH i-g-t 17/18] xe_mmap: skip VRAM tests if no VRAM is found Zbigniew Kempczyński
2023-03-10 10:52 ` Das, Nirmoy
2023-03-13 6:48 ` Zbigniew Kempczyński
2023-03-14 12:26 ` Das, Nirmoy
2023-03-10 8:23 ` [igt-dev] [PATCH i-g-t 18/18] meson: replace "igt@xe/" by "igt@" Zbigniew Kempczyński
2023-03-10 10:23 ` [igt-dev] ✓ Fi.CI.BAT: success for Add igt_doc.py Patchwork
2023-03-13 1:18 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230310082326.12088-13-zbigniew.kempczynski@intel.com \
--to=zbigniew.kempczynski@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox