From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [i-g-t 1/2] scripts/test_list: Ignore uncompiled tests
Date: Thu, 31 Aug 2023 17:53:29 +0200 [thread overview]
Message-ID: <20230831175329.0ca5e409@maurocar-mobl2> (raw)
In-Reply-To: <20230831152200.1192557-2-bhanuprakash.modem@intel.com>
On Thu, 31 Aug 2023 20:51:59 +0530
Bhanuprakash Modem <bhanuprakash.modem@intel.com> wrote:
> As we are using wildcards in test_config json file, script
> assumes each file in the list is compiled & <file_name>.testlist
> is generated. But it is not always true.
>
> Example:
> - kms_test_config.json includes all files inside chamelium dir
> - And if we compile without chamelium tests, will endup with
> build failures.
>
> $ meson -Dchamelium=disabled build && ninja -C build
> FileNotFoundError: [Errno 2] No such file or directory: 'igt/build/tests/kms_chamelium_frames.testlist'
> [1551/1555] Compiling C object 'runner/527aa9f@@runner_test@exe/runner_tests.c.o'.
> ninja: build stopped: subcommand failed.
> make: *** [Makefile:10: all] Error 1
>
> So, update the scripts to just ignore if <file_name>.testlist isn't find.
>
> $ meson -Dchamelium=disabled build && ninja -C build
> [5/7] Generating kms_tests.rst with a custom command
> kms_chamelium_hpd.testlist: Testlist file not found.
> kms_chamelium_frames.testlist: Testlist file not found.
> kms_chamelium_audio.testlist: Testlist file not found.
> kms_chamelium_edid.testlist: Testlist file not found.
> kms_chamelium_color.testlist: Testlist file not found.
> [7/7] Generating kms_tests.html with a custom command
>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> ---
> scripts/test_list.py | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/test_list.py b/scripts/test_list.py
> index c23d6d735..0bcc96869 100755
> --- a/scripts/test_list.py
> +++ b/scripts/test_list.py
> @@ -914,8 +914,12 @@ class TestList:
> """ Return a list of tests as reported by --list-subtests """
> tests = []
> for name in self.filenames:
> - fname = re.sub(r"\.c$", ".testlist", name.split('/')[-1])
> - fname = os.path.join(self.igt_build_path, "tests", fname)
> + testlist = re.sub(r"\.c$", ".testlist", name.split('/')[-1])
> + fname = os.path.join(self.igt_build_path, "tests", testlist)
> +
> + if not os.path.isfile(fname):
> + print(f"{testlist}: Testlist file not found.")
> + continue
>
> with open(fname, 'r', encoding='utf8') as handle:
> for line in handle:
next prev parent reply other threads:[~2023-08-31 15:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-31 15:21 [igt-dev] [i-g-t 0/2] Ignore uncompiled tests Bhanuprakash Modem
2023-08-31 15:21 ` [igt-dev] [i-g-t 1/2] scripts/test_list: " Bhanuprakash Modem
2023-08-31 15:53 ` Mauro Carvalho Chehab [this message]
2023-08-31 15:22 ` [igt-dev] [i-g-t 2/2] testplan/kms: Make documentation is mandatory for all kms subtests Bhanuprakash Modem
2023-08-31 15:54 ` Mauro Carvalho Chehab
2023-08-31 20:10 ` [igt-dev] ✗ GitLab.Pipeline: warning for Ignore uncompiled tests Patchwork
2023-08-31 20:40 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork
2023-08-31 20:46 ` [igt-dev] ✓ Fi.CI.BAT: " Patchwork
2023-09-01 2:44 ` [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=20230831175329.0ca5e409@maurocar-mobl2 \
--to=mauro.chehab@linux.intel.com \
--cc=bhanuprakash.modem@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