Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
U
urv-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
urv-core
Commits
5d903309
Commit
5d903309
authored
Sep 15, 2022
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tb/isa-testsuite: improve handling of urv specific tests
parent
ceff473f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
main.sv
tb/isa-testsuite/main.sv
+16
-10
No files found.
tb/isa-testsuite/main.sv
View file @
5d903309
...
...
@@ -314,13 +314,14 @@ class ISATestRunner extends LoggerClient;
status
=
R_OK
;
endtask
// runTest
task
automatic
runAllTests
(
string
test_dir
,
string
list_file
)
;
task
automatic
runAllTests
(
string
test_dir
,
string
list_file
,
inout
int
failCount
)
;
automatic
string
tests
[$]
;
automatic
int
n
,
i
,
f
,
failCount
=
0
;
automatic
int
n
,
i
,
f
;
automatic
string
failedTests
=
""
;
f
=
$
fopen
(
$
sformatf
(
"%s/%s"
,
test_dir
,
list_file
)
,
"r"
)
;
if
(
f
==
0
)
$
fatal
;
while
(
!
$
feof
(
f
))
begin
...
...
@@ -328,6 +329,9 @@ class ISATestRunner extends LoggerClient;
void
'
($
fscanf
(
f
,
"%s"
,
fname
))
;
if
(
fname
[
0
]
==
"#"
||
fname
==
""
)
continue
;
tests
.
push_back
(
fname
)
;
end
...
...
@@ -337,9 +341,6 @@ class ISATestRunner extends LoggerClient;
automatic
TestStatus
status
;
automatic
string
s
;
if
(
tests
[
i
][
0
]
==
"#"
||
tests
[
i
]
==
""
)
continue
;
// $display("Run %s", tests[i]);
runTest
(
{
test_dir
,
"/"
,
tests
[
i
]
},
status
,
failedTest
)
;
...
...
@@ -360,12 +361,14 @@ class ISATestRunner extends LoggerClient;
end
endtask
// runAllTests
task
automatic
testsResult
(
int
failCount
)
;
if
(
failCount
)
fail
(
$
sformatf
(
"%d tests FAILED"
,
failCount
)
)
;
else
pass
()
;
endtask
// runAllTests
endtask
endclass
// ISATestRunner
...
...
@@ -373,6 +376,7 @@ endclass // ISATestRunner
automatic
int
i
;
automatic
ISATestRunner
testRunner
=
new
;
automatic
Logger
l
=
Logger
::
get
()
;
automatic
int
failCount
;
for
(
i
=
0
;
i
<
n_configs
;
i
++
)
begin
...
...
@@ -380,9 +384,11 @@ endclass // ISATestRunner
l
.
startTest
($
sformatf
(
"Full ISA Test for feature set:%s"
,
DUT
.
getConfigurationString
()
)
)
;
testRunner
.
runAllTests
(
"../../sw/testsuite/isa"
,
"tests.lst"
)
;
failCount
=
0
;
testRunner
.
runAllTests
(
"../../sw/testsuite/isa"
,
"tests.lst"
,
failCount
)
;
if
(
configs
[
i
]
.
ecc
)
testRunner
.
runAllTests
(
"../../sw/testsuite/isa"
,
"tests-urv.lst"
)
;
testRunner
.
runAllTests
(
"../../sw/testsuite/isa"
,
"tests-urv.lst"
,
failCount
)
;
testRunner
.
testsResult
(
failCount
)
;
end
l
.
writeTestReport
(
"report.txt"
)
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment