From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org, mchehab@kernel.org
Subject: [igt-dev] [PATCH i-g-t] scripts/test_list: Create dir if it doesn't exist
Date: Fri, 5 May 2023 11:44:31 +0530 [thread overview]
Message-ID: <20230505061431.3157151-1-bhanuprakash.modem@intel.com> (raw)
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)
+
with open(fname, 'w', encoding='utf8') as handler:
for sub in test_subtests[test]:
handler.write (f"{sub}\n")
--
2.40.0
next reply other threads:[~2023-05-05 6:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 6:14 Bhanuprakash Modem [this message]
2023-05-05 6:48 ` [igt-dev] [PATCH i-g-t] scripts/test_list: Create dir if it doesn't exist 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=20230505061431.3157151-1-bhanuprakash.modem@intel.com \
--to=bhanuprakash.modem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=mchehab@kernel.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