Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [i-g-t V2] scripts/test_list: Create dir if it doesn't exist
@ 2023-05-05  7:00 Bhanuprakash Modem
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Bhanuprakash Modem @ 2023-05-05  7:00 UTC (permalink / raw)
  To: igt-dev

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-06  0:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-05  7:00 [igt-dev] [i-g-t V2] scripts/test_list: Create dir if it doesn't exist Bhanuprakash Modem
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox