Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv2v
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
sv2v
Commits
44c2e870
Commit
44c2e870
authored
Aug 02, 2021
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test runner checks for warnings emitted by sv2v
parent
543b4590
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
15 deletions
+20
-15
test/lib/functions.sh
+18
-13
test/siloed/run.sh
+2
-2
No files found.
test/lib/functions.sh
View file @
44c2e870
...
@@ -42,21 +42,20 @@ assertConverts() {
...
@@ -42,21 +42,20 @@ assertConverts() {
ac_file
=
$1
ac_file
=
$1
ac_tmpa
=
$SHUNIT_TMPDIR
/ac-conv-tmpa.v
ac_tmpa
=
$SHUNIT_TMPDIR
/ac-conv-tmpa.v
$SV2V
$ac_file
2> /dev/null
>
$ac_tmpa
convert
"1st conversion of
$ac_file
"
$ac_tmpa
$ac_file
assertTrue
"1st conversion of
$ac_file
failed"
$?
ac_tmpb
=
$SHUNIT_TMPDIR
/ac-conv-tmpb.v
ac_tmpb
=
$SHUNIT_TMPDIR
/ac-conv-tmpb.v
$SV2V
$ac_tmpa
2> /dev/null
>
$ac_tmpb
convert
"2nd conversion of
$ac_file
"
$ac_tmpb
$ac_tmpa
assertTrue
"2nd conversion of
$ac_file
failed"
$?
diff
$ac_tmpa
$ac_tmpb
>
/dev/null
diff
$ac_tmpa
$ac_tmpb
>
/dev/null
assertTrue
"conversion of
$ac_file
not stable after the first iteration"
$?
assertTrue
"conversion of
$ac_file
not stable after the first iteration"
$?
ac_tmpc
=
$SHUNIT_TMPDIR
/ac-conv-tmpc.v
ac_tmpc
=
$SHUNIT_TMPDIR
/ac-conv-tmpc.v
$SV2V
--pass-through
$ac_file
2> /dev/null
>
$ac_tmpc
convert
"pass through of
$ac_file
"
$ac_tmpc
--pass-through
$ac_file
assertTrue
"pass through of
$ac_file
failed"
$?
ac_tmpd
=
$SHUNIT_TMPDIR
/ac-conv-tmpd.v
ac_tmpd
=
$SHUNIT_TMPDIR
/ac-conv-tmpd.v
$SV2V
$ac_tmpc
2> /dev/null
>
$ac_tmpd
convert
"conversion of pass through of
$ac_file
"
$ac_tmpd
$ac_tmpc
assertTrue
"conversion of pass through of
$ac_file
failed"
$?
diff
$ac_tmpa
$ac_tmpd
>
/dev/null
diff
$ac_tmpa
$ac_tmpd
>
/dev/null
assertTrue
"pass through then conversion differs for
$ac_file
"
$?
assertTrue
"pass through then conversion differs for
$ac_file
"
$?
...
@@ -80,9 +79,15 @@ assertNotMatch() {
...
@@ -80,9 +79,15 @@ assertNotMatch() {
# convert SystemVerilog source file(s)
# convert SystemVerilog source file(s)
convert
()
{
convert
()
{
out_file
=
$1
;
shift
description
=
$1
$SV2V
"
$@
"
2> /dev/null
>
$out_file
out_file
=
$2
assertTrue
"conversion failed"
$?
shift
2
$SV2V
"
$@
"
2>
$SHUNIT_TMPDIR
/stderr
>
$out_file
assertTrue
"
$description
failed"
$?
if
[
-s
$SHUNIT_TMPDIR
/stderr
]
;
then
fail
"
$description
emitted warnings:"
cat
$SHUNIT_TMPDIR
/stderr
fi
}
}
simpleTest
()
{
simpleTest
()
{
...
@@ -109,10 +114,10 @@ simpleTest() {
...
@@ -109,10 +114,10 @@ simpleTest() {
fi
fi
cs
=
$SHUNIT_TMPDIR
/cs.v
cs
=
$SHUNIT_TMPDIR
/cs.v
convert
$cs
$sv
convert
"standard conversion"
$cs
$sv
cv
=
$SHUNIT_TMPDIR
/cv.v
cv
=
$SHUNIT_TMPDIR
/cv.v
convert
$cv
$sv
-v
convert
"verbose conversion"
$cv
$sv
-v
simulateAndCompare
$ve
$cs
$cv
$tb
simulateAndCompare
$ve
$cs
$cv
$tb
}
}
...
...
test/siloed/run.sh
View file @
44c2e870
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
test_default
()
{
test_default
()
{
cs
=
$SHUNIT_TMPDIR
/cs.v
cs
=
$SHUNIT_TMPDIR
/cs.v
cv
=
$SHUNIT_TMPDIR
/cv.v
cv
=
$SHUNIT_TMPDIR
/cv.v
convert
$cs
package.svh module.sv
convert
"standard conversion"
$cs
package.svh module.sv
convert
$cv
package.svh module.sv
-v
convert
"verbose conversion"
$cv
package.svh module.sv
-v
simulateAndCompare reference.v
$cs
$cv
"
$SCRIPT_DIR
/empty.v"
simulateAndCompare reference.v
$cs
$cv
"
$SCRIPT_DIR
/empty.v"
}
}
...
...
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