Skip to content
Snippets Groups Projects
Commit 2f7f8f26 authored by dam1n19's avatar dam1n19
Browse files

Added Regression Results Python Script

parent f931478e
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/python3
#-----------------------------------------------------------------------------
# SoCLabs Regression Results Script
#
# Contributors
#
# David Mapstone (d.a.mapstone@soton.ac.uk)
#
# Copyright � 2021-3, SoC Labs (www.soclabs.org)
#-----------------------------------------------------------------------------
from tabulate import tabulate
import sys
def regression_results(results_file):
file = open(results_file,"r")
data_lines = file.readlines()
passes = 0
fails = 0
test_num = 0
table_data = []
# Read Data in
for line in data_lines:
if "PASSED" in line:
passes += 1
test_num += 1
elif "FAILED" in line:
fails += 1
test_num += 1
line_data = line.split(" ")
table_data.append(line_data)
print(tabulate(table_data, headers=["Test Name", "Result"]))
print("--------------------")
print(f"PASSES: {passes}/{test_num}")
if __name__ == "__main__":
file = str(sys.argv[1])
regression_results(file)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment