Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SoCTools Flow
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SoCLabs
SoCTools Flow
Commits
2f7f8f26
Commit
2f7f8f26
authored
1 year ago
by
dam1n19
Browse files
Options
Downloads
Patches
Plain Diff
Added Regression Results Python Script
parent
f931478e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/regression_result.py
+42
-0
42 additions, 0 deletions
tools/regression_result.py
with
42 additions
and
0 deletions
tools/regression_result.py
0 → 100755
+
42
−
0
View file @
2f7f8f26
#!/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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment