mirror of
https://github.com/myhdl/myhdl.git
synced 2024-12-14 07:44:38 +08:00
implement decorator to mark bug related tests as expected failures
This commit is contained in:
parent
f2c5068dd9
commit
a12cc4c602
20
myhdl/test/conversion/conftest.py
Normal file
20
myhdl/test/conversion/conftest.py
Normal file
@ -0,0 +1,20 @@
|
||||
from itertools import chain
|
||||
|
||||
import pytest
|
||||
|
||||
from myhdl.conversion import verify
|
||||
|
||||
xfail = pytest.mark.xfail
|
||||
|
||||
hdlmap = {
|
||||
'verilog': ('icarus', 'vlog'),
|
||||
'vhdl': ('GHDL', 'vcom')
|
||||
}
|
||||
|
||||
|
||||
def bug(issue_no, hdl='all'):
|
||||
if hdl == 'all':
|
||||
sims = list(chain.from_iterable(hdlmap.values()))
|
||||
else:
|
||||
sims = hdlmap[hdl]
|
||||
return xfail(verify.simulator in sims, reason='issue '+issue_no)
|
@ -11,8 +11,7 @@ from myhdl.conversion import analyze, verify
|
||||
|
||||
from myhdl import *
|
||||
|
||||
xfail_ghdl = pytest.mark.xfail(verify.simulator == 'GHDL',
|
||||
reason='issue #33')
|
||||
from conftest import bug
|
||||
|
||||
class Intf1:
|
||||
def __init__(self, x):
|
||||
@ -189,7 +188,7 @@ def test_three_analyze():
|
||||
intf = IntfWithConstant2()
|
||||
analyze(m_top_const, clock, reset, x, y, intf)
|
||||
|
||||
@xfail_ghdl
|
||||
@bug('33', 'vhdl')
|
||||
def test_three_verify():
|
||||
assert verify(c_testbench_three) == 0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user