From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 1/1] scripts: add a parser to produce documentation from Kernel C file metatags
Date: Fri, 3 Feb 2023 15:45:08 +0100 [thread overview]
Message-ID: <20230203154508.0ee405b9@maurocar-mobl2> (raw)
In-Reply-To: <87r0v6zxki.fsf@intel.com>
On Fri, 03 Feb 2023 15:29:49 +0200
Jani Nikula <jani.nikula@linux.intel.com> wrote:
> >> The script alone isn't enough; how do you bolt this into other
> >> documentation? More ad hoc scripting like
> >> docs/reference/igt-gpu-tools/{generate_description_xml.py,generate_programs_xml.sh}?
> >
> > No need. This script could be called to produce, let's say, Xe documentation by adding
> > a target at tests/xe/meson.build that would do something similar to:
> >
> > ${SRCDIR}/scripts/igt-doc ${SRCDIR}/tests/xe/*.c > ${DESTDIR}/docs/xe_tests.rst
> >
> > And CI would be running:
> >
> > ${SRCDIR}/scripts/igt-doc ${SRCDIR}/tests/xe/*.c --check
>
> I think we have different ideas of what it means to *nicely* integrate
No matter what solution used, some rules are needed at meson.build to
produce documentation. One of the requirements is to have a way to validate
if the documents are updated.
So, it needs to be something that:
1. it is easy to be parsed;
2. it is easy for developers to write;
3. it is embedded at the C file that contains the tests.
Anything different than that will lead into the documentation gaps
that we currently have.
See, if you pick a couple of random IGT test files:
$ for i in $(seq 1 10); do find tests/ -name "*.c" | shuf -n 1; done
I doubt you'll be able to quickly discover details on what each
test does (what the test does, what platforms are supported, what it is
required to run them, etc), even if you write a script to parse it.
You'll probably spend some time to find the documentation, and that's if
they're available and updated.
By having comments inside the code like what it is proposed on this
patch, you can get them with a simple command:
$ grep -A10 -E "\* TEST\b" $(find tests/ -name "*.c")
Assuming that we place the documentation embedded in a C file, it
means that meson.build will require some addition any way by running
some executable. As meson was built exactly with the purpose of
executing external programs (mesa, gcc, etc), calling an external
program seems *nicely integrated* to me.
Regards,
Mauro
next prev parent reply other threads:[~2023-02-03 14:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 8:26 [igt-dev] [PATCH i-g-t 0/1] Add a script to document IGT tests Mauro Carvalho Chehab
2023-02-03 8:26 ` [igt-dev] [PATCH i-g-t 1/1] scripts: add a parser to produce documentation from Kernel C file metatags Mauro Carvalho Chehab
[not found] ` <Y9ze++qjDfKudq0P@adrinael.net>
2023-02-03 11:13 ` Mauro Carvalho Chehab
[not found] ` <87tu02zxt2.fsf@intel.com>
2023-02-03 14:16 ` Mauro Carvalho Chehab
[not found] ` <874js311zb.fsf@intel.com>
2023-02-03 11:37 ` Mauro Carvalho Chehab
[not found] ` <87r0v6zxki.fsf@intel.com>
2023-02-03 14:45 ` Mauro Carvalho Chehab [this message]
[not found] ` <CAKMK7uFRQU2=2h4AD1VfVX4NEQzSrd_nODJF9XCLipzRurbQew@mail.gmail.com>
2023-02-03 11:47 ` Mauro Carvalho Chehab
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=20230203154508.0ee405b9@maurocar-mobl2 \
--to=mauro.chehab@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
/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