From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v3 5/6] tests/i915: Improve test documentation
Date: Wed, 17 May 2023 09:25:24 +0200 [thread overview]
Message-ID: <20230517092524.6085346d@maurocar-mobl2> (raw)
In-Reply-To: <20230516164734.zulree7ks5j42jrs@kamilkon-desk1>
On Tue, 16 May 2023 18:47:34 +0200
Kamil Konieczny <kamil.konieczny@linux.intel.com> wrote:
> Hi Mauro,
>
> while I was reading 6/6 I realised that test names were stripped
> from uderscores, '_', see example below.
>
...
> > diff --git a/tests/core_auth.c b/tests/core_auth.c
> > index 257f124820a4..ee7fbaabfa92 100644
> > --- a/tests/core_auth.c
> > +++ b/tests/core_auth.c
> > @@ -42,6 +42,27 @@
> > #include <sys/poll.h>
> > #include <sys/resource.h>
> > #include "drm.h"
> > +/**
> > + * TEST: core auth
> --------------- ^
> No underscore in test name.
That's by purpose. The idea here is just to have a summary of the contents
of a test file.
This is produced via this python code:
if desc == '':
desc = re.sub(r'[-_]', ' ', basename)
desc = re.sub(r'\.c', '', desc)
out += '/**\n'
out += f' * TEST: {desc}\n'
It is basically the name of the file without .c and replacing
- and _ by spaces.
Please notice that the normal output, produced at build time will just ignore
it. This is only seen if one calls the tool with "--per-test" flag:
$ ./scripts/igt_doc.py --config tests/i915/*.json --per-test --file tests/core_auth.c
=============
igt@core_auth
=============
:Category: Desktop client
:Description: Call drmGetMagic() and drmAuthMagic() and see if it behaves.
:Feature: core
:File: tests/core_auth.c
:Functionality: permission management for clients
:Sub-category: DRM
:Summary: core auth
:Test category: GEM_Legacy
igt@core_auth@basic-auth
========================
:Description: Test magic numbers for master and slave.
:Run type: BAT
...
There, "core auth" is mapped there at the Summary field:
=============
igt@core_auth
=============
...
:Summary: core auth
The file name is always preserved, and comes from either the config file
or from the --file <files> parameter:
:File: tests/core_auth.c
Btw, Summary is the only field that it is not inherited by subtests. All
other fields if not replaced by subtest-specific fields are inherited.
So, on a normal hierarchical output (without --per-test), we'll see them
mapped using the hierarchy defined at the JSON config file:
./scripts/igt_doc.py --config tests/i915/*.json --file tests/core_auth.c
=================================
Implemented tests for I915 driver
=================================
Category: Desktop client
========================
Sub-category: DRM
-----------------
Functionality: permission management for clients
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feature: core
_____________
Run type: BAT
~~~~~~~~~~~~~
``igt@core_auth@basic-auth``
:Description: Test magic numbers for master and slave.
:Test category: GEM_Legacy
...
Regards,
Mauro
next prev parent reply other threads:[~2023-05-17 7:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-09 9:07 [igt-dev] [PATCH i-g-t v3 0/6] Better document i915 tests Mauro Carvalho Chehab
2023-05-09 9:07 ` [igt-dev] [PATCH i-g-t v3 1/6] scripts/test_list.py: expand testlist fields Mauro Carvalho Chehab
2023-05-16 15:56 ` Kamil Konieczny
2023-05-09 9:07 ` [igt-dev] [PATCH i-g-t v3 2/6] scripts/test_list.py: add support to exclude files Mauro Carvalho Chehab
2023-05-16 15:57 ` Kamil Konieczny
2023-05-09 9:07 ` [igt-dev] [PATCH i-g-t v3 3/6] scripts/test_list.py: fix some hints pointed by Ruff Mauro Carvalho Chehab
2023-05-16 16:02 ` Kamil Konieczny
2023-05-09 9:07 ` [igt-dev] [PATCH i-g-t v3 4/6] testplan/meson.build: add i915 support for a testplan document Mauro Carvalho Chehab
2023-05-16 16:18 ` Kamil Konieczny
2023-05-09 9:07 ` [igt-dev] [PATCH i-g-t v3 5/6] tests/i915: Improve test documentation Mauro Carvalho Chehab
2023-05-16 16:28 ` Kamil Konieczny
2023-05-16 16:47 ` Kamil Konieczny
2023-05-17 7:25 ` Mauro Carvalho Chehab [this message]
2023-05-09 9:07 ` [igt-dev] [PATCH i-g-t v3 6/6] tests/i915: Enhance " Mauro Carvalho Chehab
2023-05-16 18:41 ` Kamil Konieczny
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=20230517092524.6085346d@maurocar-mobl2 \
--to=mauro.chehab@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@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