Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
23b662339This file is pinned to the selected release. Download the original to open it in your design tool.
#!/usr/bin/env python3
import sys
failed = False
tbman_lines = []
for line in open(sys.argv[1]).readlines():
if line.startswith("TBMAN:"):
tbman_lines.append(line.strip()[7:])
expected_lines = [
"Starting",
"String printf",
"Printing int: 1234",
"CPU requested termination, exit code 0"
]
if (len(expected_lines) != len(tbman_lines)):
failed = True
if failed or any(a != b for a, b in zip(tbman_lines, expected_lines)):
failed = True
if failed:
print("Test FAILED.")
else:
print("Test PASSED.")