From 50107636a0fbf766b48ebfd557742fbdc460f316 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Fri, 26 Jan 2018 12:47:32 -0800 Subject: [PATCH] Fail test early if spice simulator is not found. --- compiler/tests/21_hspice_delay_test.py | 2 ++ compiler/tests/21_hspice_setuphold_test.py | 3 +++ compiler/tests/21_ngspice_delay_test.py | 2 ++ compiler/tests/21_ngspice_setuphold_test.py | 2 ++ 4 files changed, 9 insertions(+) diff --git a/compiler/tests/21_hspice_delay_test.py b/compiler/tests/21_hspice_delay_test.py index 20372191..5dcd6ff5 100644 --- a/compiler/tests/21_hspice_delay_test.py +++ b/compiler/tests/21_hspice_delay_test.py @@ -18,6 +18,8 @@ class timing_sram_test(unittest.TestCase): OPTS.check_lvsdrc = False OPTS.spice_name="hspice" OPTS.analytical_delay = False + self.assertTrue(OPTS.spice_exe) + # This is a hack to reload the characterizer __init__ with the spice version import characterizer reload(characterizer) diff --git a/compiler/tests/21_hspice_setuphold_test.py b/compiler/tests/21_hspice_setuphold_test.py index 91638e32..4a10c92e 100644 --- a/compiler/tests/21_hspice_setuphold_test.py +++ b/compiler/tests/21_hspice_setuphold_test.py @@ -18,6 +18,9 @@ class timing_setup_test(unittest.TestCase): OPTS.check_lvsdrc = False OPTS.spice_name="hspice" OPTS.analytical_delay = False + self.assertTrue(OPTS.spice_exe) + + # This is a hack to reload the characterizer __init__ with the spice version import characterizer reload(characterizer) from characterizer import setup_hold diff --git a/compiler/tests/21_ngspice_delay_test.py b/compiler/tests/21_ngspice_delay_test.py index 82a027e3..defa2130 100644 --- a/compiler/tests/21_ngspice_delay_test.py +++ b/compiler/tests/21_ngspice_delay_test.py @@ -18,6 +18,8 @@ class timing_sram_test(unittest.TestCase): OPTS.check_lvsdrc = False OPTS.spice_name="ngspice" OPTS.analytical_delay = False + self.assertTrue(OPTS.spice_exe) + # This is a hack to reload the characterizer __init__ with the spice version import characterizer reload(characterizer) diff --git a/compiler/tests/21_ngspice_setuphold_test.py b/compiler/tests/21_ngspice_setuphold_test.py index 2a848ffb..4c417190 100644 --- a/compiler/tests/21_ngspice_setuphold_test.py +++ b/compiler/tests/21_ngspice_setuphold_test.py @@ -18,6 +18,8 @@ class timing_setup_test(unittest.TestCase): OPTS.check_lvsdrc = False OPTS.spice_name="ngspice" OPTS.analytical_delay = False + self.assertTrue(OPTS.spice_exe) + # This is a hack to reload the characterizer __init__ with the spice version import characterizer reload(characterizer)