@@ -117,6 +117,7 @@ def test_yosys_script(self):
117117 app = Sphinx (buildername = "html" , warningiserror = True , ** sphinx_dirs )
118118 app .build (force_all = True )
119119
120+
120121class TestYosysType (TestBase ):
121122
122123 TEST_CASE_NAME = "TestYowasp"
@@ -190,6 +191,7 @@ def test_yosys_path(self):
190191 app = Sphinx (buildername = "html" , warningiserror = True , ** sphinx_dirs )
191192 app .build (force_all = True )
192193
194+
193195class TestNMigen (TestBase ):
194196
195197 TEST_CASE_NAME = "TestNMigen"
@@ -216,6 +218,7 @@ def test_yosys_script(self):
216218 app = Sphinx (buildername = "html" , warningiserror = True , ** sphinx_dirs )
217219 app .build (force_all = True )
218220
221+
219222class TestRTLIL (TestBase ):
220223
221224 TEST_CASE_NAME = "TestRTLIL"
@@ -273,5 +276,33 @@ def test_yosys_script(self):
273276 app .build (force_all = True )
274277
275278
279+ class TestFlatten (TestBase ):
280+
281+ TEST_CASE_NAME = "TestFlatten"
282+ TEST_CASE_BUILD_DIR = os .path .join ("build" , TEST_CASE_NAME )
283+
284+ def test_yosys_script (self ):
285+ TEST_NAME = "test_flatten"
286+ TEST_BUILD_DIR = os .path .join ("build" , self .TEST_CASE_NAME , TEST_NAME )
287+ TEST_FILES = [
288+ "test_flatten/test_flatten.rst" ,
289+ "code/verilog/fullAdder.v" ,
290+ "code/verilog/halfAdder.v"
291+ ]
292+ TEST_JINJA_DICT = {
293+ "hdl_diagrams_path" : "'{}'" .format (HDL_DIAGRAMS_PATH ),
294+ "master_doc" : "'test_flatten'" ,
295+ "custom_variables" : ""
296+ }
297+
298+ self .prepare_test (TEST_NAME , TEST_BUILD_DIR , TEST_FILES , ** TEST_JINJA_DICT )
299+
300+ # Run the Sphinx
301+ sphinx_dirs = get_sphinx_dirs (TEST_BUILD_DIR )
302+ with docutils_namespace ():
303+ app = Sphinx (buildername = "html" , warningiserror = True , ** sphinx_dirs )
304+ app .build (force_all = True )
305+
306+
276307if __name__ == '__main__' :
277308 unittest .main ()
0 commit comments