diff --git a/setup.py b/setup.py index 8580d32..ef317d6 100644 --- a/setup.py +++ b/setup.py @@ -30,6 +30,6 @@ setup( "Operating System :: OS Independent", "Programming Language :: Python", ], - packages=find_packages(exclude=("test",)), + packages=find_packages(), include_package_data=True, ) diff --git a/test/Makefile b/test/Makefile index 4b461cd..7cc0b37 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,7 +1,6 @@ -COREDIR = ../ PYTHON = python3 -CMD = PYTHONPATH=$(COREDIR) $(PYTHON) +CMD = $(PYTHON) model_tb: $(CMD) ./model/mac.py diff --git a/test/__init__.py b/test/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/arp_tb.py b/test/arp_tb.py index dd27dc3..a6c1c9d 100644 --- a/test/arp_tb.py +++ b/test/arp_tb.py @@ -7,7 +7,7 @@ from liteeth.common import * from liteeth.core.mac import LiteEthMAC from liteeth.core.arp import LiteEthARP -from test.model import phy, mac, arp +from model import phy, mac, arp ip_address = 0x12345678 mac_address = 0x12345678abcd diff --git a/test/etherbone_tb.py b/test/etherbone_tb.py index 01c6b86..4688dca 100644 --- a/test/etherbone_tb.py +++ b/test/etherbone_tb.py @@ -7,7 +7,7 @@ from liteeth.common import * from liteeth.core import LiteEthUDPIPCore 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 mac_address = 0x12345678abcd diff --git a/test/icmp_tb.py b/test/icmp_tb.py index 97b9061..d74ef1a 100644 --- a/test/icmp_tb.py +++ b/test/icmp_tb.py @@ -6,11 +6,11 @@ from litex.soc.interconnect.stream_sim import * from liteeth.common import * from liteeth.core import LiteEthIPCore -from test.model.dumps import * -from test.model.mac import * -from test.model.ip import * -from test.model.icmp import * -from test.model import phy, mac, arp, ip, icmp +from model.dumps import * +from model.mac import * +from model.ip import * +from model.icmp import * +from model import phy, mac, arp, ip, icmp ip_address = 0x12345678 mac_address = 0x12345678abcd diff --git a/test/ip_tb.py b/test/ip_tb.py index 3669e17..f58baa6 100644 --- a/test/ip_tb.py +++ b/test/ip_tb.py @@ -6,7 +6,7 @@ from litex.soc.interconnect.stream_sim import * from liteeth.common import * from liteeth.core import LiteEthIPCore -from test.model import phy, mac, arp, ip +from model import phy, mac, arp, ip ip_address = 0x12345678 mac_address = 0x12345678abcd diff --git a/test/mac_core_tb.py b/test/mac_core_tb.py index c120734..7f5f17b 100644 --- a/test/mac_core_tb.py +++ b/test/mac_core_tb.py @@ -6,7 +6,7 @@ from litex.soc.interconnect.stream_sim import * from liteeth.common import * from liteeth.core.mac.core import LiteEthMACCore -from test.model import phy, mac +from model import phy, mac class TB(Module): diff --git a/test/mac_wishbone_tb.py b/test/mac_wishbone_tb.py index 5faf706..de8e535 100644 --- a/test/mac_wishbone_tb.py +++ b/test/mac_wishbone_tb.py @@ -6,7 +6,7 @@ from litex.soc.interconnect.stream_sim import * from liteeth.common import * from liteeth.core.mac import LiteEthMAC -from test.model import phy, mac +from model import phy, mac class WishboneMaster: diff --git a/test/model/arp.py b/test/model/arp.py index 6b9eba4..ab3cc7c 100644 --- a/test/model/arp.py +++ b/test/model/arp.py @@ -4,7 +4,7 @@ from litex.soc.interconnect.stream_sim import * from liteeth.common import * -from test.model import mac +from model import mac def print_arp(s): @@ -124,8 +124,8 @@ class ARP(Module): request.target_ip = ip_address if __name__ == "__main__": - from test.model.dumps import * - from test.model.mac import * + from model.dumps import * + from model.mac import * errors = 0 # ARP request packet = MACPacket(arp_request) diff --git a/test/model/etherbone.py b/test/model/etherbone.py index 849ad0e..36fecfe 100644 --- a/test/model/etherbone.py +++ b/test/model/etherbone.py @@ -6,7 +6,7 @@ from litex.soc.tools.remote.etherbone import * from liteeth.common import * -from test.model import udp +from model import udp def print_etherbone(s): diff --git a/test/model/icmp.py b/test/model/icmp.py index 1b2b200..a2c7427 100644 --- a/test/model/icmp.py +++ b/test/model/icmp.py @@ -4,7 +4,7 @@ from litex.soc.interconnect.stream_sim import * from liteeth.common import * -from test.model import ip +from model import ip def print_icmp(s): @@ -85,9 +85,9 @@ class ICMP(Module): pass if __name__ == "__main__": - from test.model.dumps import * - from test.model.mac import * - from test.model.ip import * + from model.dumps import * + from model.mac import * + from model.ip import * errors = 0 # ICMP packet packet = MACPacket(ping_request) diff --git a/test/model/ip.py b/test/model/ip.py index 0ca3785..58ca99c 100644 --- a/test/model/ip.py +++ b/test/model/ip.py @@ -4,7 +4,7 @@ from litex.soc.interconnect.stream_sim import * from liteeth.common import * -from test.model import mac +from model import mac def print_ip(s): @@ -132,8 +132,8 @@ class IP(Module): self.icmp_callback(packet) if __name__ == "__main__": - from test.model.dumps import * - from test.model.mac import * + from model.dumps import * + from model.mac import * errors = 0 # UDP packet packet = MACPacket(udp) diff --git a/test/model/mac.py b/test/model/mac.py index 765ff02..5eab4ac 100644 --- a/test/model/mac.py +++ b/test/model/mac.py @@ -135,7 +135,7 @@ class MAC(Module): raise ValueError # XXX handle this properly if __name__ == "__main__": - from test.model.dumps import * + from model.dumps import * errors = 0 packet = MACPacket(arp_request) packet.decode_remove_header() diff --git a/test/model/udp.py b/test/model/udp.py index 322bf03..3ed0eb4 100644 --- a/test/model/udp.py +++ b/test/model/udp.py @@ -4,7 +4,7 @@ from litex.soc.interconnect.stream_sim import * from liteeth.common import * -from test.model import ip +from model import ip def print_udp(s): @@ -96,9 +96,9 @@ class UDP(Module): self.etherbone_callback(packet) if __name__ == "__main__": - from test.model.dumps import * - from test.model.mac import * - from test.model.ip import * + from model.dumps import * + from model.mac import * + from model.ip import * errors = 0 # UDP packet packet = MACPacket(udp) diff --git a/test/udp_tb.py b/test/udp_tb.py index 9c06934..ba180e8 100644 --- a/test/udp_tb.py +++ b/test/udp_tb.py @@ -6,8 +6,7 @@ from litex.soc.interconnect.stream_sim import * from liteeth.common import * from liteeth.core import LiteEthUDPIPCore - -from test.model import phy, mac, arp, ip, udp +from model import phy, mac, arp, ip, udp ip_address = 0x12345678 mac_address = 0x12345678abcd