1
0
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:
Keerthan Jaic 2015-03-25 11:01:06 -04:00
parent f2c5068dd9
commit a12cc4c602
2 changed files with 22 additions and 3 deletions

View 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)

View File

@ -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