Skip to content

Commit aa43476

Browse files
authored
fix Log NoneType Error (#807)
1 parent 0379ec4 commit aa43476

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/gha/integration_testing/test_validation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,9 @@ def summarize_test_results(tests, platform, summary_dir, file_name="summary.log"
261261
failed_test = failed_test[0] + "." + failed_test[1]
262262
pattern = fr'\[ RUN \] {failed_test}(.*?)\[ FAILED \] {failed_test}'
263263
failure_log = re.search(pattern, test.logs, re.MULTILINE | re.DOTALL)
264-
summary_json["failures"][testapp]["failed_tests"][failed_test] = failure_log.group()
265-
summary.append("\n%s FAILED:\n%s\n" % (failed_test, failure_log.group()))
264+
if failure_log:
265+
summary_json["failures"][testapp]["failed_tests"][failed_test] = failure_log.group()
266+
summary.append("\n%s FAILED:\n%s\n" % (failed_test, failure_log.group()))
266267
summary_json["flakiness"] = {get_name(test.testapp_path):{"logs": [], "ftl_links": [], "raw_result_links": [], "flaky_tests": dict()} for (test, _) in flaky_testapps}
267268
for (test, results) in flaky_testapps:
268269
testapp = get_name(test.testapp_path)

0 commit comments

Comments
 (0)