aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-12-26 14:28:14 +0100
committerTristan Gingold <tgingold@free.fr>2020-12-26 17:35:10 +0100
commit340fc792bba2ffdb4f930bc427a39ea3a1b659b2 (patch)
treeff779cda337d79975af460747d488c1ad96da635
parentb9788c0bb2fabdcdd70029cd2ffbdd12706aea1d (diff)
downloadghdl-340fc792bba2ffdb4f930bc427a39ea3a1b659b2.tar.gz
ghdl-340fc792bba2ffdb4f930bc427a39ea3a1b659b2.tar.bz2
ghdl-340fc792bba2ffdb4f930bc427a39ea3a1b659b2.zip
testsuite/python: adjust tests for previous commit. For #1551
-rw-r--r--testsuite/python/units01/show_ports.py3
-rwxr-xr-xtestsuite/python/units01/show_units.py4
2 files changed, 4 insertions, 3 deletions
diff --git a/testsuite/python/units01/show_ports.py b/testsuite/python/units01/show_ports.py
index 31c680817..a11f2acbd 100644
--- a/testsuite/python/units01/show_ports.py
+++ b/testsuite/python/units01/show_ports.py
@@ -101,7 +101,8 @@ if __name__ == "__main__":
# Initialization: set options and then load libaries
errorout_console.Install_Handler()
libghdl.set_option(b"--std=08")
- libghdl.analyze_init()
+ if libghdl.analyze_init_status() != 0:
+ raise Exception("libghdl initialization error")
# Recursively find and parse all the files with extension *.vhdl
if len(argv) > 1:
diff --git a/testsuite/python/units01/show_units.py b/testsuite/python/units01/show_units.py
index 9207bde8c..43baf9aed 100755
--- a/testsuite/python/units01/show_units.py
+++ b/testsuite/python/units01/show_units.py
@@ -14,8 +14,8 @@ def init():
# Set options. This must be done before analyze_init()
libghdl.set_option(b"--std=08")
# Finish initialization. This will load the standard package
- libghdl.analyze_init()
-
+ if libghdl.analyze_init_status() != 0:
+ raise Exception("libghdl initialization error")
def get_identifier_ptr(n):
"""Return the python string from node :param n: identifier"""