测试用例分散到各个文件中去,避免一个文件过大
This commit is contained in:
32
tb/shinTest/testcase/detect.py
Normal file
32
tb/shinTest/testcase/detect.py
Normal file
@@ -0,0 +1,32 @@
|
||||
from pyutils import *
|
||||
|
||||
def tc1():
|
||||
genPkt = GenPkt()
|
||||
#-------------------------------------------------------------------------
|
||||
#>>>>>>嗅探数据包1,正常的嗅探数据包
|
||||
genPkt.clean()
|
||||
genPkt.setPktType(1)
|
||||
gen_file_def = "detect_pkt"
|
||||
sm_idx = 0
|
||||
|
||||
genPkt.addAfterExc(genWriteTransLenCode(gen_file_def, sm_idx)
|
||||
+genWriteTransPktCode(gen_file_def, sm_idx)
|
||||
+genTrgTransPktCode(gen_file_def, sm_idx)
|
||||
+genReadAckPktCode(gen_file_def, sm_idx))
|
||||
genPkt.gen("./generated/shin/%s.vh"%(gen_file_def, ), 1)
|
||||
|
||||
def tc2():
|
||||
genPkt = GenPkt()
|
||||
#-------------------------------------------------------------------------
|
||||
#>>>>>>嗅探数据包2,正常的嗅探数据包
|
||||
genPkt.clean()
|
||||
genPkt.setPktType(1)
|
||||
gen_file_def = "detect_pkt2"
|
||||
sm_idx = 0
|
||||
|
||||
genPkt.addAfterExc(genWriteTransLenCode(gen_file_def, sm_idx)
|
||||
+genWriteTransPktCode(gen_file_def, sm_idx)
|
||||
+genTrgTransPktCode(gen_file_def, sm_idx)
|
||||
+genReadAckPktCode(gen_file_def, sm_idx))
|
||||
genPkt.gen("./generated/shin/%s.vh"%(gen_file_def, ), 1)
|
||||
|
||||
Reference in New Issue
Block a user