From 6a322ed405e8db0c197e849cff4afe3ec8cc0142 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 5 Aug 2020 14:51:50 +0200 Subject: [PATCH] test/test_examples: update. --- test/test_examples.py | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/test/test_examples.py b/test/test_examples.py index db1e3e5..84206b2 100644 --- a/test/test_examples.py +++ b/test/test_examples.py @@ -3,30 +3,14 @@ import unittest import os -import subprocess from litescope.software.dump import * root_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), "..") -make_script = os.path.join(root_dir, "examples", "make.py") class TestExamples(unittest.TestCase): - def test_simple_de0nano(self): - os.system("rm -rf {}/build".format(root_dir)) - os.system("python3 {} -t simple -p de0nano -Ob run False build-bitstream".format(make_script)) - self.assertEqual(os.path.isfile("{}/build/litescopesoc_de0nano.v".format(root_dir)), True) + def test_arty(self): + os.system(f"rm -rf {root_dir}/build") + os.system(f"cd {root_dir}/examples && python3 arty.py") + self.assertEqual(os.path.isfile(f"{root_dir}/examples/build/arty/gateware/arty.v"), True) - def test_simple_kc705(self): - os.system("rm -rf {}/build".format(root_dir)) - os.system("python3 {} -t simple -p kc705 -Ob run False build-bitstream".format(make_script)) - self.assertEqual(os.path.isfile("{}/build/litescopesoc_kc705.v".format(root_dir)), True) - - def test_core(self): - os.system("rm -rf {}/build".format(root_dir)) - os.system("python3 {} -t core build-core".format(make_script)) - self.assertEqual(os.path.isfile("{}/build/litescope.v".format(root_dir)), True) - - def test_fast_scope_arty(self): - os.system("rm -rf {}/build".format(root_dir)) - os.system("python3 {}/examples/fast_scope_arty.py no-compile".format(root_dir)) - self.assertEqual(os.path.isfile("{}/build/top.v".format(root_dir)), True)