aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/pyunit/dom/Sanity.py
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2022-06-21 23:10:26 +0200
committerPatrick Lehmann <Patrick.Lehmann@plc2.de>2022-12-24 11:47:51 +0100
commitb5884712a4ce8980831d4b231d123688063ccbf2 (patch)
tree7f5f8327e890ec521d2a9f0ce64cfd8104c033c1 /testsuite/pyunit/dom/Sanity.py
parentade27197e682b9479a8b1d30b3762db7bffb6203 (diff)
downloadghdl-b5884712a4ce8980831d4b231d123688063ccbf2.tar.gz
ghdl-b5884712a4ce8980831d4b231d123688063ccbf2.tar.bz2
ghdl-b5884712a4ce8980831d4b231d123688063ccbf2.zip
Enable and disable AMS support based on VHDLVersion.
(cherry picked from commit 04d141309147a5731ea3461d59cfc8e17ad57c82)
Diffstat (limited to 'testsuite/pyunit/dom/Sanity.py')
-rw-r--r--testsuite/pyunit/dom/Sanity.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/testsuite/pyunit/dom/Sanity.py b/testsuite/pyunit/dom/Sanity.py
index 54cb4103b..4fc721d55 100644
--- a/testsuite/pyunit/dom/Sanity.py
+++ b/testsuite/pyunit/dom/Sanity.py
@@ -34,6 +34,7 @@ from pathlib import Path
from pytest import mark
+from pyVHDLModel import VHDLVersion
from pyGHDL.dom.NonStandard import Design, Document
@@ -55,6 +56,8 @@ def test_AllVHDLSources(parameters):
id, file = parameters.split(":")
filePath = _TESTSUITE_ROOT / file
+ vhdlVersion = VHDLVersion.AMS2017 if "ams" in file else VHDLVersion.VHDL2008
+
lib = design.GetLibrary(f"sanity_{id}")
- document = Document(filePath)
+ document = Document(filePath, vhdlVersion=vhdlVersion)
design.AddDocument(document, lib)