Skip to content

Commit 43849bc

Browse files
committed
Check for error messages from FVP stdout
Add check of the stdout log from FVP for ^[EF][ :] that indicates error or fatal log messages. Signed-off-by: Per Åstrand <[email protected]> Change-Id: I8c6869706254d680f6ce8445626552b2f57e6fe6
1 parent e57bbbb commit 43849bc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

backends/arm/test/runner_utils.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import json
77
import logging
88
import os
9+
import re
910
import shutil
1011
import subprocess
1112
import tempfile
@@ -262,7 +263,12 @@ def run_corstone300(
262263
]
263264
result = _run_cmd(command_args, check=False)
264265
result_stdout = result.stdout.decode()
265-
if "Hard fault" in result_stdout or len(result.stderr) > 0:
266+
267+
error_regex = r"(^[EF][: ].*$)|(^.*Hard fault.*$)|(^.*Assertion.*$)"
268+
269+
# Check for errors in the output
270+
# regex to check for error or fault messages in stdout from FVP
271+
if re.compile(error_regex, re.MULTILINE).search(result_stdout):
266272
raise RuntimeError(
267273
f"Corstone simulation failed, log: \n {result_stdout}\n{result.stderr.decode()}"
268274
)

0 commit comments

Comments
 (0)