@@ -197,10 +197,11 @@ def prepare(self) -> bool:
197
197
return True
198
198
199
199
def send_file_to_pastebin (self , log_path , log_name : str ):
200
- if not os .path .exists (log_name ):
200
+ if not os .path .exists (log_path ):
201
201
return
202
202
send_paste_bin = os .getenv ("HOME" ) + "/ci-scripts/send_to_paste_bin.sh"
203
203
cmd = f'{ send_paste_bin } "{ log_path } " "{ log_name } "'
204
+ print (f"sending logs to pastebin: { cmd } " )
204
205
try :
205
206
run_command (cmd )
206
207
except subprocess .CalledProcessError :
@@ -244,14 +245,14 @@ def collect_data(self):
244
245
for sclorg in ["S2I" , "NOS2I" ]:
245
246
name = f"{ test_case } -{ sclorg } "
246
247
self .send_file_to_pastebin (
247
- log_path = Path (SCLORG_DIR ) / f"{ test_case } - { sclorg } " / "log.txt" ,
248
- log_name = f"{ RESULTS_DIR } /{ name } .txt" ,
248
+ log_path = Path (SCLORG_DIR ) / f"{ name } " / "log.txt" ,
249
+ log_name = f"{ path_dir } /{ name } .log .txt" ,
249
250
)
250
251
self .data_dict ["tmt" ]["logs" ].append (
251
252
(
252
253
name ,
253
- Path (SCLORG_DIR ) / f"{ test_case } - { sclorg } " / "log.txt" ,
254
- Path (RESULTS_DIR ) / f"{ name } .txt" ,
254
+ Path (SCLORG_DIR ) / f"{ name } " / "log.txt" ,
255
+ Path (path_dir ) / f"{ name } .log .txt" ,
255
256
)
256
257
)
257
258
failed_tests = True
@@ -267,14 +268,14 @@ def collect_data(self):
267
268
for sclorg in ["S2I" , "NOS2I" ]:
268
269
name = f"{ test_case } -{ sclorg } "
269
270
self .send_file_to_pastebin (
270
- log_path = Path (SCLORG_DIR ) / f"{ test_case } - { sclorg } " / "log.txt" ,
271
- log_name = f"{ RESULTS_DIR } /{ name } .txt" ,
271
+ log_path = Path (SCLORG_DIR ) / f"{ name } " / "log.txt" ,
272
+ log_name = f"{ path_dir } /{ name } .log .txt" ,
272
273
)
273
274
self .data_dict ["tmt" ]["logs" ].append (
274
275
(
275
276
name ,
276
- Path (SCLORG_DIR ) / f"{ test_case } - { sclorg } " / "log.txt" ,
277
- Path (RESULTS_DIR ) / f"{ name } .txt" ,
277
+ Path (SCLORG_DIR ) / f"{ name } " / "log.txt" ,
278
+ Path (path_dir ) / f"{ name } .log .txt" ,
278
279
)
279
280
)
280
281
failed_tests = True
@@ -288,20 +289,22 @@ def collect_data(self):
288
289
for sclorg in ["S2I" , "NOS2I" ]:
289
290
name = f"{ test_case } -{ sclorg } "
290
291
self .send_file_to_pastebin (
291
- log_path = Path (SCLORG_DIR ) / f"{ test_case } - { sclorg } " / "log.txt" ,
292
- log_name = f"{ RESULTS_DIR } /{ name } .txt" ,
292
+ log_path = Path (SCLORG_DIR ) / f"{ name } " / "log.txt" ,
293
+ log_name = f"{ path_dir } /{ name } .log .txt" ,
293
294
)
294
295
self .data_dict ["tmt" ]["logs" ].append (
295
296
(
296
297
name ,
297
- Path (SCLORG_DIR ) / f"{ test_case } - { sclorg } " / "log.txt" ,
298
- Path (RESULTS_DIR ) / f"{ name } .txt" ,
298
+ Path (SCLORG_DIR ) / f"{ name } " / "log.txt" ,
299
+ Path (path_dir ) / f"{ name } .log .txt" ,
299
300
)
300
301
)
301
302
failed_tests = True
302
303
continue
303
304
results_dir = data_dir / "results"
305
+ print ("Results dir is for failed_container: " , results_dir )
304
306
failed_containers = list (results_dir .rglob ("*.log" ))
307
+ print ("Failed containers are: " , failed_containers )
305
308
if not failed_containers :
306
309
self .data_dict ["SUCCESS" ].append (test_case )
307
310
if self .args .upstream_tests :
@@ -357,6 +360,9 @@ def generate_email_body(self):
357
360
358
361
def generate_failed_containers (self ):
359
362
for test_case , plan , msg in self .available_test_case :
363
+ print (
364
+ f"generate_email_body_for_failed_containers: { test_case } , { plan } , { msg } "
365
+ )
360
366
if test_case not in self .data_dict :
361
367
continue
362
368
print (
0 commit comments