Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit eae1519

Browse files
committedFeb 20, 2025··
Add error to test report
1 parent f6e1b28 commit eae1519

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed
 

‎runtime-tests-results/table_generator.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
SUCCESS_SYMBOL = ":white_check_mark:"
77
FAILURE_SYMBOL = ":x:"
8+
ERROR_SYMBOL = ":fire:"
89

910
# Load the JSON file passed as argument to the script
1011
with open(sys.argv[1], "r") as f:
@@ -51,11 +52,13 @@
5152
if target not in proc_test_data[platform][test_name]:
5253
proc_test_data[platform][test_name][target] = {
5354
"failures": 0,
54-
"total": 0
55+
"total": 0,
56+
"errors": 0
5557
}
5658

5759
proc_test_data[platform][test_name][target]["total"] += test["tests"]
58-
proc_test_data[platform][test_name][target]["failures"] += test["failures"] + test["errors"]
60+
proc_test_data[platform][test_name][target]["failures"] += test["failures"]
61+
proc_test_data[platform][test_name][target]["errors"] = test["errors"]
5962

6063
target_list = sorted(target_list)
6164

@@ -79,11 +82,14 @@
7982
for target in target_list:
8083
if target in targets:
8184
test_data = targets[target]
82-
print(f"|{test_data['total']-test_data['failures']}/{test_data['total']}", end="")
83-
if test_data["failures"] > 0:
84-
print(f" {FAILURE_SYMBOL}", end="")
85+
if test_data["errors"] > 0:
86+
print(f"|Error {ERROR_SYMBOL}", end="")
8587
else:
86-
print(f" {SUCCESS_SYMBOL}", end="")
88+
print(f"|{test_data['total']-test_data['failures']}/{test_data['total']}", end="")
89+
if test_data["failures"] > 0:
90+
print(f" {FAILURE_SYMBOL}", end="")
91+
else:
92+
print(f" {SUCCESS_SYMBOL}", end="")
8793
else:
8894
print("|-", end="")
8995
print("")

0 commit comments

Comments
 (0)
Please sign in to comment.