aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/pyunit/dom
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2022-06-19 20:49:03 +0200
committerPatrick Lehmann <Patrick.Lehmann@plc2.de>2022-06-19 20:49:03 +0200
commit2387eff54cb72997fb9afd30a2ea0754264deb3b (patch)
tree9d34b09df88c45d7a4a7a610121a13334a3cf1b9 /testsuite/pyunit/dom
parentc634df29a8ccd593f07f5e67625c556eff3a5345 (diff)
downloadghdl-2387eff54cb72997fb9afd30a2ea0754264deb3b.tar.gz
ghdl-2387eff54cb72997fb9afd30a2ea0754264deb3b.tar.bz2
ghdl-2387eff54cb72997fb9afd30a2ea0754264deb3b.zip
Enabled AMS support for all VHDL files. Added more [NOT IMPLEMENTED] rules to support VHDL-AMS code.
Diffstat (limited to 'testsuite/pyunit/dom')
-rw-r--r--testsuite/pyunit/dom/Sanity.py22
1 files changed, 9 insertions, 13 deletions
diff --git a/testsuite/pyunit/dom/Sanity.py b/testsuite/pyunit/dom/Sanity.py
index 6ac4bea25..5e932322d 100644
--- a/testsuite/pyunit/dom/Sanity.py
+++ b/testsuite/pyunit/dom/Sanity.py
@@ -31,31 +31,27 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ============================================================================
from pathlib import Path
-from subprocess import check_call, STDOUT
-from sys import executable as sys_executable
from pytest import mark
-from pyGHDL.dom.NonStandard import Design
+from pyGHDL.dom.NonStandard import Design, Document
+
if __name__ == "__main__":
print("ERROR: you called a testcase declaration file as an executable module.")
print("Use: 'python -m unitest <testcase module>'")
exit(1)
+
_TESTSUITE_ROOT = Path(__file__).parent.parent.parent.resolve()
_GHDL_ROOT = _TESTSUITE_ROOT.parent
-# design = Design()
-@mark.xfail(reason="Was it every working?")
+design = Design()
+
+
@mark.parametrize("file", [str(f.relative_to(_GHDL_ROOT)) for f in _TESTSUITE_ROOT.glob("sanity/**/*.vhdl")])
def test_AllVHDLSources(file):
- check_call([sys_executable, _GHDL_ROOT / "pyGHDL/cli/dom.py", "pretty", "-f", file], stderr=STDOUT)
-
- # try:
- # lib = design.GetLibrary("sanity")
- # document = Document(Path(file))
- # design.AddDocument(document, lib)
- # except DOMException as ex:
- # print(ex)
+ lib = design.GetLibrary("sanity")
+ document = Document(Path(file))
+ design.AddDocument(document, lib)