Skip to content

Commit bc05ec3

Browse files
committed
fix get_log_paths returning compressed files
1 parent 10325a2 commit bc05ec3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

ci/jobs/scripts/integration_tests_runner.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -502,11 +502,14 @@ def _handle_broken_tests(
502502

503503
context_name = self.params["context_name"]
504504

505-
def get_log_paths(test_name):
505+
def get_log_paths(log_paths, test_name):
506506
"""Could be a list of logs for all tests or a dict with test name as a key"""
507507
if isinstance(log_paths, dict):
508-
return sorted(log_paths[test_name], reverse=True)
509-
return sorted(log_paths, reverse=True)
508+
log_paths = log_paths[test_name]
509+
log_paths = sorted(
510+
[x for x in log_paths if x.endswith(".log")], reverse=True
511+
)
512+
return log_paths
510513

511514
broken_tests_log = os.path.join(self.result_path, "broken_tests_handler.log")
512515

@@ -576,7 +579,7 @@ def matches_substring(substring, log, is_regex):
576579
)
577580

578581
# Should only care about the most recent log file
579-
log_path = get_log_paths(failed_test)[0]
582+
log_path = get_log_paths(log_paths, failed_test)[0]
580583
test_logs = extract_fail_logs(log_path)
581584
test_log = test_logs.get(failed_test.split("::")[-1])
582585
if test_log is None:

0 commit comments

Comments
 (0)