Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
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] [PATCH i-g-t] scripts/test_list: Create dir if it doesn't exist
Date: Fri, 5 May 2023 08:48:44 +0200	[thread overview]
Message-ID: <20230505084844.1fd76b14@maurocar-mobl2> (raw)
In-Reply-To: <20230505061431.3157151-1-bhanuprakash.modem@intel.com>

On Fri,  5 May 2023 11:44:31 +0530
Bhanuprakash Modem <bhanuprakash.modem@intel.com> wrote:

> To generate the testlist create the destination dir if it
> doesn't exist.
> 
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
>  scripts/test_list.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/scripts/test_list.py b/scripts/test_list.py
> index 1c5e195eb..9ae1cd154 100755
> --- a/scripts/test_list.py
> +++ b/scripts/test_list.py
> @@ -1149,6 +1149,9 @@ class TestList:
>              fname = directory + "/" + test_prefix + fname + ".testlist"
>              fname = re.sub(r"[\s_]+", "-", fname)
>  
> +            if not os.path.exists(directory):
> +                os.makedirs(directory)
> +

Don't need to have it inside the for loop, as the directory is
the same for all test lists.

After moving it to be before the "for test in test_subtests.keys():"
loop:

Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>

Regards,
Mauro

      reply	other threads:[~2023-05-05  6:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05  6:14 [igt-dev] [PATCH i-g-t] scripts/test_list: Create dir if it doesn't exist Bhanuprakash Modem
2023-05-05  6:48 ` Mauro Carvalho Chehab [this message]

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=20230505084844.1fd76b14@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