aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-12-26 07:12:51 +0100
committerTristan Gingold <tgingold@free.fr>2020-12-26 07:14:21 +0100
commitf60887e70ac8f2b24637b4710f5cb9a18acef6aa (patch)
treeb003b966ae4b573aa0aeb5562df53ca845acd295 /testsuite
parent8ed352778368cfbff239bb2a89fc6a937c65fc26 (diff)
downloadghdl-f60887e70ac8f2b24637b4710f5cb9a18acef6aa.tar.gz
ghdl-f60887e70ac8f2b24637b4710f5cb9a18acef6aa.tar.bz2
ghdl-f60887e70ac8f2b24637b4710f5cb9a18acef6aa.zip
testsuite/python/units01: install error handler
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/python/units01/show_ports.py2
-rwxr-xr-xtestsuite/python/units01/show_units.py5
2 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/python/units01/show_ports.py b/testsuite/python/units01/show_ports.py
index 0076e4779..31c680817 100644
--- a/testsuite/python/units01/show_ports.py
+++ b/testsuite/python/units01/show_ports.py
@@ -8,6 +8,7 @@ from libghdl.thin import files_map
from libghdl.thin.vhdl import nodes
from libghdl.thin.vhdl import sem_lib
from libghdl.thin.vhdl import pyutils
+from libghdl.thin import errorout_console
def get_identifier_ptr(n):
@@ -98,6 +99,7 @@ def list_units(filename):
if __name__ == "__main__":
# Initialization: set options and then load libaries
+ errorout_console.Install_Handler()
libghdl.set_option(b"--std=08")
libghdl.analyze_init()
diff --git a/testsuite/python/units01/show_units.py b/testsuite/python/units01/show_units.py
index 56ab8adee..9207bde8c 100755
--- a/testsuite/python/units01/show_units.py
+++ b/testsuite/python/units01/show_units.py
@@ -4,11 +4,16 @@ from libghdl.thin import name_table
from libghdl.thin import files_map
from libghdl.thin.vhdl import nodes
from libghdl.thin.vhdl import sem_lib
+from libghdl.thin import errorout_console
def init():
"""Initialization: set options and then load libaries"""
+ # Print error messages on the console
+ errorout_console.Install_Handler()
+ # 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()