Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [i-g-t V2] scripts/test_list: Create dir if it doesn't exist
Date: Fri,  5 May 2023 12:30:17 +0530	[thread overview]
Message-ID: <20230505070017.3170987-1-bhanuprakash.modem@intel.com> (raw)

To generate the testlist create the destination dir if it
doesn't exist.

V2: - Move the logic to outside the loop (Mauro)

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
 scripts/test_list.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/test_list.py b/scripts/test_list.py
index 855950506..9a909e364 100755
--- a/scripts/test_list.py
+++ b/scripts/test_list.py
@@ -1134,6 +1134,9 @@ class TestList:
 
         test_subtests = self.get_subtests(sort_field)
 
+        if not os.path.exists(directory):
+            os.makedirs(directory)
+
         for test in test_subtests.keys():  # pylint: disable=C0201,C0206
             if not test_subtests[test]:
                 continue
-- 
2.40.0

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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05  7:00 Bhanuprakash Modem [this message]
2023-05-05  8:48 ` [igt-dev] ✓ Fi.CI.BAT: success for scripts/test_list: Create dir if it doesn't exist (rev2) Patchwork
2023-05-06  0:21 ` [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=20230505070017.3170987-1-bhanuprakash.modem@intel.com \
    --to=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