summaryrefslogtreecommitdiffstats
path: root/.github/scripts/tests
diff options
context:
space:
mode:
authornkozlovskiy <[email protected]>2023-12-01 17:53:17 +0300
committernkozlovskiy <[email protected]>2023-12-01 21:47:08 +0300
commit271c7e06d30cbe44a3f890dadf1a65a930b50612 (patch)
treef25d7c09691d80c773061e290fd33cf08a173abb /.github/scripts/tests
parentb9ff7373453fa46190e267b4e6013ced0994b8a0 (diff)
ci: add directory existence check
Diffstat (limited to '.github/scripts/tests')
-rwxr-xr-x.github/scripts/tests/transform-ya-junit.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/.github/scripts/tests/transform-ya-junit.py b/.github/scripts/tests/transform-ya-junit.py
index 4ac7951f9b7..3521af9064c 100755
--- a/.github/scripts/tests/transform-ya-junit.py
+++ b/.github/scripts/tests/transform-ya-junit.py
@@ -54,8 +54,13 @@ class YTestReportTrace:
self.traces = {}
def load(self, subdir):
- test_results_dir = f"{subdir}/test-results/"
- for folder in os.listdir(os.path.join(self.out_root, test_results_dir)):
+ test_results_dir = os.path.join(self.out_root, f"{subdir}/test-results/")
+
+ if not os.path.isdir(test_results_dir):
+ print(f"Directory {test_results_dir} doesn't exist")
+ return
+
+ for folder in os.listdir(test_results_dir):
fn = os.path.join(self.out_root, test_results_dir, folder, "ytest.report.trace")
if not os.path.isfile(fn):