From 028146f3c2139bea92f52d9a5cf99851da47a9f5 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Fri, 26 Jan 2018 13:23:11 -0800 Subject: [PATCH] Add output explaining error for not finding simulator in unit tests. --- compiler/tests/21_hspice_delay_test.py | 4 +++- compiler/tests/21_hspice_setuphold_test.py | 5 ++++- compiler/tests/21_ngspice_delay_test.py | 4 +++- compiler/tests/21_ngspice_setuphold_test.py | 4 +++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/compiler/tests/21_hspice_delay_test.py b/compiler/tests/21_hspice_delay_test.py index 87b6576e..8c52afdb 100644 --- a/compiler/tests/21_hspice_delay_test.py +++ b/compiler/tests/21_hspice_delay_test.py @@ -23,7 +23,9 @@ class timing_sram_test(unittest.TestCase): import characterizer reload(characterizer) from characterizer import delay - self.assertTrue(OPTS.spice_exe) + if not OPTS.spice_exe: + self.error("Could not find {} simulator.".format(OPTS.spice_name)) + self.assertTrue(OPTS.spice_exe) import sram diff --git a/compiler/tests/21_hspice_setuphold_test.py b/compiler/tests/21_hspice_setuphold_test.py index a0d9df02..b246f5c5 100644 --- a/compiler/tests/21_hspice_setuphold_test.py +++ b/compiler/tests/21_hspice_setuphold_test.py @@ -23,7 +23,10 @@ class timing_setup_test(unittest.TestCase): import characterizer reload(characterizer) from characterizer import setup_hold - self.assertTrue(OPTS.spice_exe) + if not OPTS.spice_exe: + self.error("Could not find {} simulator.".format(OPTS.spice_name)) + self.assertTrue(OPTS.spice_exe) + import sram import tech diff --git a/compiler/tests/21_ngspice_delay_test.py b/compiler/tests/21_ngspice_delay_test.py index 45249cd6..b313d0ec 100644 --- a/compiler/tests/21_ngspice_delay_test.py +++ b/compiler/tests/21_ngspice_delay_test.py @@ -23,7 +23,9 @@ class timing_sram_test(unittest.TestCase): import characterizer reload(characterizer) from characterizer import delay - self.assertTrue(OPTS.spice_exe) + if not OPTS.spice_exe: + self.error("Could not find {} simulator.".format(OPTS.spice_name)) + self.assertTrue(OPTS.spice_exe) import sram diff --git a/compiler/tests/21_ngspice_setuphold_test.py b/compiler/tests/21_ngspice_setuphold_test.py index 185c877c..6b1c4d8c 100644 --- a/compiler/tests/21_ngspice_setuphold_test.py +++ b/compiler/tests/21_ngspice_setuphold_test.py @@ -23,7 +23,9 @@ class timing_setup_test(unittest.TestCase): import characterizer reload(characterizer) from characterizer import setup_hold - self.assertTrue(OPTS.spice_exe) + if not OPTS.spice_exe: + self.error("Could not find {} simulator.".format(OPTS.spice_name)) + self.assertTrue(OPTS.spice_exe) import sram import tech