Skip to content

Commit f692ad0

Browse files
committed
tests has been rearranged. Symbolic links to pyverilog have been removed.
1 parent 503240e commit f692ad0

36 files changed

+74
-118
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ all:
55
.PHONY: clean
66
clean:
77
make clean -C ./pyverilog
8+
make clean -C ./tests
89
rm -rf *.pyc __pycache__ *.out parsetab.py pyverilog.egg-info build dist
910

1011
.PHONY: release

tests/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
PYTHON=python3
2+
#PYTHON=python
3+
14
.PHONY: all
25
all: clean
36

47
.PHONY: test
58
test:
6-
find . -maxdepth 1 -type d |grep "./" | xargs -I {} make test -C {}
9+
$(PYTHON) -m pytest -vv
710

811
.PHONY: clean
912
clean:
10-
find . -maxdepth 1 -type d |grep "./" | xargs -I {} make clean -C {}
13+
rm -rf *.pyc __pycache__ parsetab.py *.out .cache
14+
find . -maxdepth 1 -type d |grep "./" | xargs -I {} make clean -C {}
Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
1-
TEST=*.py
2-
ARGS=
3-
41
PYTHON=python3
52
#PYTHON=python
6-
#OPT=-m pdb
7-
#OPT=-m cProfile -s time
8-
#OPT=-m cProfile -o profile.rslt
93

104
.PHONY: all
11-
all: test
5+
all: clean
126

137
.PHONY: test
148
test:
15-
$(PYTHON) -m pytest -vv $(TEST)
9+
$(PYTHON) -m pytest -vv
1610

1711
.PHONY: clean
1812
clean:
19-
rm -rf *.pyc __pycache__ parsetab.py *.out
13+
rm -rf *.pyc __pycache__ parsetab.py *.out .cache

tests/ast_code_generator_test/pyverilog

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/ast_code_generator_test/test_assign.py renamed to tests/ast_code_generator_test/test_ast_assign.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import sys
3+
34
import pyverilog.vparser.ast as vast
45
from pyverilog.ast_code_generator.codegen import ASTCodeGenerator
56

tests/dataflow_test/Makefile

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
1-
TEST=*.py
2-
ARGS=
3-
41
PYTHON=python3
52
#PYTHON=python
6-
#OPT=-m pdb
7-
#OPT=-m cProfile -s time
8-
#OPT=-m cProfile -o profile.rslt
93

104
.PHONY: all
11-
all: test
5+
all: clean
126

137
.PHONY: test
148
test:
15-
$(PYTHON) -m pytest -vv $(TEST)
9+
$(PYTHON) -m pytest -vv
1610

1711
.PHONY: clean
1812
clean:
19-
rm -rf *.pyc __pycache__ parsetab.py *.out
13+
rm -rf *.pyc __pycache__ parsetab.py *.out .cache

tests/dataflow_test/pyverilog

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/dataflow_test/test_blocking.py renamed to tests/dataflow_test/test_dat_blocking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import sys
33
from pyverilog.dataflow.dataflow_analyzer import VerilogDataflowAnalyzer
44

5-
codedir = '../../testcode/'
5+
codedir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + '/testcode/'
66

77
expected = """\
88
Directive:

tests/dataflow_test/test_case.py renamed to tests/dataflow_test/test_dat_case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import sys
33
from pyverilog.dataflow.dataflow_analyzer import VerilogDataflowAnalyzer
44

5-
codedir = '../../testcode/'
5+
codedir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + '/testcode/'
66

77
expected = """\
88
(Bind dest:TOP.cnt \

tests/dataflow_test/test_case_in_func.py renamed to tests/dataflow_test/test_dat_case_in_func.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import os
22
import sys
3-
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) )
4-
53
from pyverilog.dataflow.dataflow_analyzer import VerilogDataflowAnalyzer
64
from pyverilog.dataflow.optimizer import VerilogDataflowOptimizer
75
from pyverilog.controlflow.controlflow_analyzer import VerilogControlflowAnalyzer
86

9-
codedir = '../../testcode/'
7+
codedir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + '/testcode/'
108

119
expected = """\
1210
TOP.IN1: TOP_IN1

0 commit comments

Comments
 (0)