test: add test_liteeth_gen

This commit is contained in:
Florent Kermarrec 2019-11-24 11:23:13 +01:00
parent bb01840b12
commit 6cce8c3c34
1 changed files with 15 additions and 0 deletions

15
test/test_liteeth_gen.py Normal file
View File

@ -0,0 +1,15 @@
# This file is Copyright (c) 2019 Florent Kermarrec <florent@enjoy-digital.fr>
# License: BSD
import unittest
import os
root_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), "..")
class TestLiteDRAMGen(unittest.TestCase):
def test(self):
for phy in ["mii", "gmii", "rgmii"]:
for core in ["wishbone", "udp"]:
os.system("rm -rf {}/build".format(root_dir))
os.system("liteeth_gen --phy={} --core={}".format(phy, core))
self.assertEqual(os.path.isfile("{}/build/gateware/liteeth_core.v".format(root_dir)), True)