test: remove __init__.py and use setup.py develop

This commit is contained in:
Florent Kermarrec 2016-03-22 10:16:17 +01:00
parent 2f15f3748e
commit e73f35c733
16 changed files with 29 additions and 31 deletions

View File

@ -30,6 +30,6 @@ setup(
"Operating System :: OS Independent", "Operating System :: OS Independent",
"Programming Language :: Python", "Programming Language :: Python",
], ],
packages=find_packages(exclude=("test",)), packages=find_packages(),
include_package_data=True, include_package_data=True,
) )

View File

@ -1,7 +1,6 @@
COREDIR = ../
PYTHON = python3 PYTHON = python3
CMD = PYTHONPATH=$(COREDIR) $(PYTHON) CMD = $(PYTHON)
model_tb: model_tb:
$(CMD) ./model/mac.py $(CMD) ./model/mac.py

View File

View File

@ -7,7 +7,7 @@ from liteeth.common import *
from liteeth.core.mac import LiteEthMAC from liteeth.core.mac import LiteEthMAC
from liteeth.core.arp import LiteEthARP from liteeth.core.arp import LiteEthARP
from test.model import phy, mac, arp from model import phy, mac, arp
ip_address = 0x12345678 ip_address = 0x12345678
mac_address = 0x12345678abcd mac_address = 0x12345678abcd

View File

@ -7,7 +7,7 @@ from liteeth.common import *
from liteeth.core import LiteEthUDPIPCore from liteeth.core import LiteEthUDPIPCore
from liteeth.frontend.etherbone import LiteEthEtherbone from liteeth.frontend.etherbone import LiteEthEtherbone
from test.model import phy, mac, arp, ip, udp, etherbone from model import phy, mac, arp, ip, udp, etherbone
ip_address = 0x12345678 ip_address = 0x12345678
mac_address = 0x12345678abcd mac_address = 0x12345678abcd

View File

@ -6,11 +6,11 @@ from litex.soc.interconnect.stream_sim import *
from liteeth.common import * from liteeth.common import *
from liteeth.core import LiteEthIPCore from liteeth.core import LiteEthIPCore
from test.model.dumps import * from model.dumps import *
from test.model.mac import * from model.mac import *
from test.model.ip import * from model.ip import *
from test.model.icmp import * from model.icmp import *
from test.model import phy, mac, arp, ip, icmp from model import phy, mac, arp, ip, icmp
ip_address = 0x12345678 ip_address = 0x12345678
mac_address = 0x12345678abcd mac_address = 0x12345678abcd

View File

@ -6,7 +6,7 @@ from litex.soc.interconnect.stream_sim import *
from liteeth.common import * from liteeth.common import *
from liteeth.core import LiteEthIPCore from liteeth.core import LiteEthIPCore
from test.model import phy, mac, arp, ip from model import phy, mac, arp, ip
ip_address = 0x12345678 ip_address = 0x12345678
mac_address = 0x12345678abcd mac_address = 0x12345678abcd

View File

@ -6,7 +6,7 @@ from litex.soc.interconnect.stream_sim import *
from liteeth.common import * from liteeth.common import *
from liteeth.core.mac.core import LiteEthMACCore from liteeth.core.mac.core import LiteEthMACCore
from test.model import phy, mac from model import phy, mac
class TB(Module): class TB(Module):

View File

@ -6,7 +6,7 @@ from litex.soc.interconnect.stream_sim import *
from liteeth.common import * from liteeth.common import *
from liteeth.core.mac import LiteEthMAC from liteeth.core.mac import LiteEthMAC
from test.model import phy, mac from model import phy, mac
class WishboneMaster: class WishboneMaster:

View File

@ -4,7 +4,7 @@ from litex.soc.interconnect.stream_sim import *
from liteeth.common import * from liteeth.common import *
from test.model import mac from model import mac
def print_arp(s): def print_arp(s):
@ -124,8 +124,8 @@ class ARP(Module):
request.target_ip = ip_address request.target_ip = ip_address
if __name__ == "__main__": if __name__ == "__main__":
from test.model.dumps import * from model.dumps import *
from test.model.mac import * from model.mac import *
errors = 0 errors = 0
# ARP request # ARP request
packet = MACPacket(arp_request) packet = MACPacket(arp_request)

View File

@ -6,7 +6,7 @@ from litex.soc.tools.remote.etherbone import *
from liteeth.common import * from liteeth.common import *
from test.model import udp from model import udp
def print_etherbone(s): def print_etherbone(s):

View File

@ -4,7 +4,7 @@ from litex.soc.interconnect.stream_sim import *
from liteeth.common import * from liteeth.common import *
from test.model import ip from model import ip
def print_icmp(s): def print_icmp(s):
@ -85,9 +85,9 @@ class ICMP(Module):
pass pass
if __name__ == "__main__": if __name__ == "__main__":
from test.model.dumps import * from model.dumps import *
from test.model.mac import * from model.mac import *
from test.model.ip import * from model.ip import *
errors = 0 errors = 0
# ICMP packet # ICMP packet
packet = MACPacket(ping_request) packet = MACPacket(ping_request)

View File

@ -4,7 +4,7 @@ from litex.soc.interconnect.stream_sim import *
from liteeth.common import * from liteeth.common import *
from test.model import mac from model import mac
def print_ip(s): def print_ip(s):
@ -132,8 +132,8 @@ class IP(Module):
self.icmp_callback(packet) self.icmp_callback(packet)
if __name__ == "__main__": if __name__ == "__main__":
from test.model.dumps import * from model.dumps import *
from test.model.mac import * from model.mac import *
errors = 0 errors = 0
# UDP packet # UDP packet
packet = MACPacket(udp) packet = MACPacket(udp)

View File

@ -135,7 +135,7 @@ class MAC(Module):
raise ValueError # XXX handle this properly raise ValueError # XXX handle this properly
if __name__ == "__main__": if __name__ == "__main__":
from test.model.dumps import * from model.dumps import *
errors = 0 errors = 0
packet = MACPacket(arp_request) packet = MACPacket(arp_request)
packet.decode_remove_header() packet.decode_remove_header()

View File

@ -4,7 +4,7 @@ from litex.soc.interconnect.stream_sim import *
from liteeth.common import * from liteeth.common import *
from test.model import ip from model import ip
def print_udp(s): def print_udp(s):
@ -96,9 +96,9 @@ class UDP(Module):
self.etherbone_callback(packet) self.etherbone_callback(packet)
if __name__ == "__main__": if __name__ == "__main__":
from test.model.dumps import * from model.dumps import *
from test.model.mac import * from model.mac import *
from test.model.ip import * from model.ip import *
errors = 0 errors = 0
# UDP packet # UDP packet
packet = MACPacket(udp) packet = MACPacket(udp)

View File

@ -6,8 +6,7 @@ from litex.soc.interconnect.stream_sim import *
from liteeth.common import * from liteeth.common import *
from liteeth.core import LiteEthUDPIPCore from liteeth.core import LiteEthUDPIPCore
from model import phy, mac, arp, ip, udp
from test.model import phy, mac, arp, ip, udp
ip_address = 0x12345678 ip_address = 0x12345678
mac_address = 0x12345678abcd mac_address = 0x12345678abcd