From 1778fbe9a96dfeb8daaf7d201eb0f2fe6d41fc11 Mon Sep 17 00:00:00 2001 From: Zhan Rongrui <2742392377@qq.com> Date: Thu, 13 Jul 2023 07:20:58 +0000 Subject: [PATCH] fix error info --- tests/extract_errors.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/extract_errors.py b/tests/extract_errors.py index 9c20b8065..b660d52d0 100644 --- a/tests/extract_errors.py +++ b/tests/extract_errors.py @@ -1,15 +1,15 @@ import re import sys -error_msg = sys.stdin.read() +runtime_error_msg = sys.stdin.read() pattern = r'File "?(.*?)"?, line (\d+),.*\n(.*?)\n(.*?)$' -for match in re.finditer(pattern, error_msg, re.MULTILINE): +for match in re.finditer(pattern, runtime_error_msg, re.MULTILINE): file = match.group(1) if file.startswith("./"): file = f"tests/{file[2:]}" line = match.group(2) error_info = match.group(4) # error_info = match.group(3) + '\n' + match.group(4) - output = f"::error file={file},line={line}::{error_info}" + output = f"::error file={file},line={line}::Error" print(output)