Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
Hdlmake
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
15
Issues
15
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
Hdlmake
Commits
6012a665
Commit
6012a665
authored
May 31, 2019
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testsuite: add tests for configparser.
parent
751f178c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
130 additions
and
8 deletions
+130
-8
Manifest.py
testsuite/028manifest_print/Manifest.py
+8
-0
Manifest.py
testsuite/029manifest_quit/Manifest.py
+10
-0
Manifest.py
testsuite/030manifest_syntax/Manifest.py
+9
-0
Manifest.py
testsuite/031manifest_except/Manifest.py
+8
-0
Makefile
testsuite/032manifest_vars/Makefile
+56
-0
Manifest.py
testsuite/032manifest_vars/Manifest.py
+9
-0
test_all.py
testsuite/test_all.py
+30
-8
No files found.
testsuite/028manifest_print/Manifest.py
0 → 100644
View file @
6012a665
action
=
"simulation"
sim_tool
=
"modelsim"
top_module
=
"gate"
files
=
[
"../files/gate.vhdl"
]
print
(
"hello from Manifest.py"
)
testsuite/029manifest_quit/Manifest.py
0 → 100644
View file @
6012a665
import
sys
action
=
"simulation"
sim_tool
=
"modelsim"
top_module
=
"gate"
files
=
[
"../files/gate.vhdl"
]
sys
.
exit
(
1
)
testsuite/030manifest_syntax/Manifest.py
0 → 100644
View file @
6012a665
action
=
"simulation"
sim_tool
=
"modelsim"
top_module
=
"gate"
files
=
[
"../files/gate.vhdl"
]
if
True
pass
testsuite/031manifest_except/Manifest.py
0 → 100644
View file @
6012a665
action
=
"simulation"
sim_tool
=
"modelsim"
top_module
=
"gate"
files
=
[
"../files/gate.vhdl"
]
assert
False
testsuite/032manifest_vars/Makefile
0 → 100644
View file @
6012a665
########################################
# This file was generated by hdlmake #
# http://ohwr.org/projects/hdl-make/ #
########################################
TOP_MODULE
:=
gate
PWD
:=
$(
shell
pwd
)
MODELSIM_INI_PATH
:=
../linux_fakebin/..
VCOM_FLAGS
:=
-quiet
-modelsimini
modelsim.ini
VSIM_FLAGS
:=
VLOG_FLAGS
:=
-quiet
-modelsimini
modelsim.ini
VMAP_FLAGS
:=
-modelsimini
modelsim.ini
#target for performing local simulation
local
:
sim_pre_cmd simulation sim_post_cmd
VERILOG_SRC
:=
VERILOG_OBJ
:=
VHDL_SRC
:=
../files/gate.vhdl
\
VHDL_OBJ
:=
work/gate/.gate_vhdl
\
INCLUDE_DIRS
:=
LIBS
:=
work
LIB_IND
:=
work/.work
simulation
:
modelsim.ini $(LIB_IND) $(VERILOG_OBJ) $(VHDL_OBJ)
$(VERILOG_OBJ)
:
modelsim.ini
$(VHDL_OBJ)
:
$(LIB_IND) modelsim.ini
modelsim.ini
:
$(MODELSIM_INI_PATH)/modelsim.ini
cp
$<
.
2>&1
work/.work
:
(
vlib work
&&
vmap
$(VMAP_FLAGS)
work
&&
touch
work/.work
)||
rm
-rf
work
work/gate/.gate_vhdl
:
../files/gate.vhdl
vcom
$(VCOM_FLAGS)
-work
work
$<
@
mkdir
-p
$
(
dir
$@
)
&&
touch
$@
# USER SIM COMMANDS
sim_pre_cmd
:
sim_post_cmd
:
CLEAN_TARGETS
:=
$(LIBS)
modelsim.ini transcript
clean
:
rm
-rf
$(CLEAN_TARGETS)
mrproper
:
clean
rm
-rf
*
.vcd
*
.wlf
.PHONY
:
mrproper clean sim_pre_cmd sim_post_cmd simulation
testsuite/032manifest_vars/Manifest.py
0 → 100644
View file @
6012a665
action
=
"simulation"
sim_tool
=
"modelsim"
top_module
=
"gate"
files
=
[
"../files/gate.vhdl"
]
__hidden
=
5
myvar
=
7
testsuite/test_all.py
View file @
6012a665
...
...
@@ -40,6 +40,10 @@ def run_compare(**kwargs):
hdlmake
.
__main__
.
hdlmake
([])
compare_makefile
()
def
run
(
args
,
**
kwargs
):
with
Config
(
**
kwargs
)
as
_
:
hdlmake
.
__main__
.
hdlmake
(
args
)
def
test_makefile_001
():
run_compare
(
path
=
"001ise"
)
...
...
@@ -53,20 +57,16 @@ def test_makefile_004():
run_compare
(
path
=
"004msim"
)
def
test_fetch
():
with
Config
(
path
=
"001ise"
)
as
_
:
hdlmake
.
__main__
.
hdlmake
([
'fetch'
])
run
([
'fetch'
],
path
=
"001ise"
)
def
test_clean
():
with
Config
(
path
=
"001ise"
)
as
_
:
hdlmake
.
__main__
.
hdlmake
([
'clean'
])
run
([
'clean'
],
path
=
"001ise"
)
def
test_list_mods
():
with
Config
(
path
=
"001ise"
)
as
_
:
hdlmake
.
__main__
.
hdlmake
([
'list-mods'
])
run
([
'list-mods'
],
path
=
"001ise"
)
def
test_list_files
():
with
Config
(
path
=
"001ise"
)
as
_
:
hdlmake
.
__main__
.
hdlmake
([
'list-files'
])
run
([
'list-files'
],
path
=
"001ise"
)
def
test_noact
():
with
Config
(
path
=
"005noact"
)
as
_
:
...
...
@@ -152,6 +152,28 @@ def test_gitsm_fetch026():
def
test_vhdl_parser
():
run_compare
(
path
=
"027vhdl_parser"
)
def
test_manifest_print
():
run
([],
path
=
"028manifest_print"
)
os
.
remove
(
'028manifest_print/Makefile'
)
def
test_manifest_quit
():
with
pytest
.
raises
(
SystemExit
)
as
_
:
run
([],
path
=
"029manifest_quit"
)
assert
False
def
test_manifest_syntax
():
with
pytest
.
raises
(
SystemExit
)
as
_
:
run
([],
path
=
"030manifest_syntax"
)
assert
False
def
test_manifest_except
():
with
pytest
.
raises
(
AssertionError
)
as
_
:
run
([],
path
=
"031manifest_except"
)
assert
False
def
test_manifest_vars
():
run
([],
path
=
"032manifest_vars"
)
@
pytest
.
mark
.
xfail
def
test_xfail
():
"""This is a self-consistency test: the test is known to fail"""
...
...
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