From 340fc792bba2ffdb4f930bc427a39ea3a1b659b2 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 26 Dec 2020 14:28:14 +0100 Subject: testsuite/python: adjust tests for previous commit. For #1551 --- testsuite/python/units01/show_ports.py | 3 ++- testsuite/python/units01/show_units.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'testsuite/python') 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""" -- cgit v1.2.3