[igt-dev] [PATCH i-g-t] scripts/test_list: Create dir if it doesn't exist
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Fri May 5 06:14:31 UTC 2023
To generate the testlist create the destination dir if it
doesn't exist.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at 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
More information about the igt-dev
mailing list