test: fix test_model
This commit is contained in:
parent
48fb4647bd
commit
937c240727
|
@ -3,12 +3,12 @@ PYTHON = python3
|
|||
CMD = $(PYTHON)
|
||||
|
||||
model_tb:
|
||||
PYTHONPATH=./ $(CMD) ./model/mac.py
|
||||
PYTHONPATH=./ $(CMD) ./model/arp.py
|
||||
PYTHONPATH=./ $(CMD) ./model/ip.py
|
||||
PYTHONPATH=./ $(CMD) ./model/udp.py
|
||||
PYTHONPATH=./ $(CMD) ./model/icmp.py
|
||||
PYTHONPATH=./ $(CMD) ./model/etherbone.py
|
||||
cd ../ && PYTHONPATH=./ $(CMD) test/model/mac.py
|
||||
cd ../ && PYTHONPATH=./ $(CMD) test/model/arp.py
|
||||
cd ../ && PYTHONPATH=./ $(CMD) test/model/ip.py
|
||||
cd ../ && PYTHONPATH=./ $(CMD) test/model/udp.py
|
||||
cd ../ && PYTHONPATH=./ $(CMD) test/model/icmp.py
|
||||
cd ../ && PYTHONPATH=./ $(CMD) test/model/etherbone.py
|
||||
|
||||
example_designs:
|
||||
cd ../example_designs && $(PYTHON) make.py -t base -s BaseSoC -p kc705 -Ob run False build-bitstream
|
||||
|
|
|
@ -124,8 +124,8 @@ class ARP(Module):
|
|||
request.target_ip = ip_address
|
||||
|
||||
if __name__ == "__main__":
|
||||
from model.dumps import *
|
||||
from model.mac import *
|
||||
from test.model.dumps import *
|
||||
from test.model.mac import *
|
||||
errors = 0
|
||||
# ARP request
|
||||
packet = MACPacket(arp_request)
|
||||
|
|
|
@ -85,9 +85,9 @@ class ICMP(Module):
|
|||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
from model.dumps import *
|
||||
from model.mac import *
|
||||
from model.ip import *
|
||||
from test.model.dumps import *
|
||||
from test.model.mac import *
|
||||
from test.model.ip import *
|
||||
errors = 0
|
||||
# ICMP packet
|
||||
packet = MACPacket(ping_request)
|
||||
|
|
|
@ -132,8 +132,8 @@ class IP(Module):
|
|||
self.icmp_callback(packet)
|
||||
|
||||
if __name__ == "__main__":
|
||||
from model.dumps import *
|
||||
from model.mac import *
|
||||
from test.model.dumps import *
|
||||
from test.model.mac import *
|
||||
errors = 0
|
||||
# UDP packet
|
||||
packet = MACPacket(udp)
|
||||
|
|
|
@ -135,7 +135,7 @@ class MAC(Module):
|
|||
raise ValueError # XXX handle this properly
|
||||
|
||||
if __name__ == "__main__":
|
||||
from model.dumps import *
|
||||
from test.model.dumps import *
|
||||
errors = 0
|
||||
packet = MACPacket(arp_request)
|
||||
packet.decode_remove_header()
|
||||
|
|
|
@ -96,9 +96,9 @@ class UDP(Module):
|
|||
self.etherbone_callback(packet)
|
||||
|
||||
if __name__ == "__main__":
|
||||
from model.dumps import *
|
||||
from model.mac import *
|
||||
from model.ip import *
|
||||
from test.model.dumps import *
|
||||
from test.model.mac import *
|
||||
from test.model.ip import *
|
||||
errors = 0
|
||||
# UDP packet
|
||||
packet = MACPacket(udp)
|
||||
|
|
Loading…
Reference in New Issue