From 6cce8c3c34c9a61c45028e0b53b7165de8ca644d Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Sun, 24 Nov 2019 11:23:13 +0100 Subject: [PATCH] test: add test_liteeth_gen --- test/test_liteeth_gen.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/test_liteeth_gen.py diff --git a/test/test_liteeth_gen.py b/test/test_liteeth_gen.py new file mode 100644 index 0000000..cfc3a32 --- /dev/null +++ b/test/test_liteeth_gen.py @@ -0,0 +1,15 @@ +# This file is Copyright (c) 2019 Florent Kermarrec +# 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)