diff --git a/compiler/modules/bank.py b/compiler/modules/bank.py index a854c40b..ced244e9 100644 --- a/compiler/modules/bank.py +++ b/compiler/modules/bank.py @@ -352,7 +352,7 @@ class bank(design.design): self.addr_size = self.col_addr_size + self.row_addr_size debug.check(self.num_rows*self.num_cols==self.word_size*self.num_words,"Invalid bank sizes.") - debug.check(self.addr_size==self.col_addr_size + self.row_addr_size,"Invalid address break down.") + debug.check(1+self.addr_size==self.col_addr_size + self.row_addr_size,"Invalid address break down.") # Width for the vdd/gnd rails self.supply_rail_width = 4*self.m2_width diff --git a/compiler/tests/00_code_format_check_test.py b/compiler/tests/00_code_format_check_test.py index 373b1516..af5f1abc 100755 --- a/compiler/tests/00_code_format_check_test.py +++ b/compiler/tests/00_code_format_check_test.py @@ -8,9 +8,9 @@ # import unittest -from testutils import header,openram_test +from testutils import * import sys,os,re -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals import debug @@ -51,7 +51,7 @@ def setup_files(path): files = [] for (dir, _, current_files) in os.walk(path): for f in current_files: - files.append(os.path.join(dir, f)) + files.append(os.getenv("OPENRAM_HOME")) nametest = re.compile("\.py$", re.IGNORECASE) select_files = list(filter(nametest.search, files)) return select_files @@ -122,4 +122,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/01_library_drc_test.py b/compiler/tests/01_library_drc_test.py index c2052e4e..41c83e6e 100755 --- a/compiler/tests/01_library_drc_test.py +++ b/compiler/tests/01_library_drc_test.py @@ -9,9 +9,9 @@ "Run a regression test the library cells for DRC" import unittest -from testutils import header,openram_test +from testutils import * import sys,os,re -#sys.path.append(os.path.join(sys.path[0],"..")) +#sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS import debug @@ -51,5 +51,5 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/02_library_lvs_test.py b/compiler/tests/02_library_lvs_test.py index 6775f41f..2366f148 100755 --- a/compiler/tests/02_library_lvs_test.py +++ b/compiler/tests/02_library_lvs_test.py @@ -9,9 +9,9 @@ "Run a regression test the library cells for LVS" import unittest -from testutils import header,openram_test +from testutils import * import sys,os,re -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS import debug @@ -74,4 +74,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/03_contact_test.py b/compiler/tests/03_contact_test.py index 2aa79df6..5daebaa5 100755 --- a/compiler/tests/03_contact_test.py +++ b/compiler/tests/03_contact_test.py @@ -9,9 +9,9 @@ "Run a regression test for DRC on basic contacts of different array sizes" import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -69,4 +69,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/03_path_test.py b/compiler/tests/03_path_test.py index 4748e18d..bf24008c 100755 --- a/compiler/tests/03_path_test.py +++ b/compiler/tests/03_path_test.py @@ -9,9 +9,9 @@ "Run a regression test on a basic path" import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS import debug @@ -96,4 +96,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/03_ptx_1finger_nmos_test.py b/compiler/tests/03_ptx_1finger_nmos_test.py index cc6d6ed6..27cf9469 100755 --- a/compiler/tests/03_ptx_1finger_nmos_test.py +++ b/compiler/tests/03_ptx_1finger_nmos_test.py @@ -9,9 +9,9 @@ "Run a regression test on a basic parameterized transistors" import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -38,4 +38,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/03_ptx_1finger_pmos_test.py b/compiler/tests/03_ptx_1finger_pmos_test.py index cd2128be..db9db687 100755 --- a/compiler/tests/03_ptx_1finger_pmos_test.py +++ b/compiler/tests/03_ptx_1finger_pmos_test.py @@ -9,9 +9,9 @@ "Run a regression test on a basic parameterized transistors" import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -38,4 +38,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/03_ptx_3finger_nmos_test.py b/compiler/tests/03_ptx_3finger_nmos_test.py index 8231f090..370c10a4 100755 --- a/compiler/tests/03_ptx_3finger_nmos_test.py +++ b/compiler/tests/03_ptx_3finger_nmos_test.py @@ -9,9 +9,9 @@ "Run a regression test on a basic parameterized transistors" import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -40,4 +40,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/03_ptx_3finger_pmos_test.py b/compiler/tests/03_ptx_3finger_pmos_test.py index 16e3730b..c67bdac3 100755 --- a/compiler/tests/03_ptx_3finger_pmos_test.py +++ b/compiler/tests/03_ptx_3finger_pmos_test.py @@ -9,9 +9,9 @@ "Run a regression test on a basic parameterized transistors" import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -40,4 +40,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/03_ptx_4finger_nmos_test.py b/compiler/tests/03_ptx_4finger_nmos_test.py index c0a54d85..7a4667bd 100755 --- a/compiler/tests/03_ptx_4finger_nmos_test.py +++ b/compiler/tests/03_ptx_4finger_nmos_test.py @@ -9,9 +9,9 @@ "Run a regression test on a basic parameterized transistors" import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -40,4 +40,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/03_ptx_4finger_pmos_test.py b/compiler/tests/03_ptx_4finger_pmos_test.py index afb874af..fe73946e 100755 --- a/compiler/tests/03_ptx_4finger_pmos_test.py +++ b/compiler/tests/03_ptx_4finger_pmos_test.py @@ -9,9 +9,9 @@ "Run a regression test on a basic parameterized transistors" import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -40,4 +40,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/03_wire_test.py b/compiler/tests/03_wire_test.py index 3b3388e9..f702c7b5 100755 --- a/compiler/tests/03_wire_test.py +++ b/compiler/tests/03_wire_test.py @@ -9,9 +9,9 @@ "Run a regression test on a basic wire" import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS import debug @@ -133,4 +133,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/04_pand2_test.py b/compiler/tests/04_pand2_test.py index af99f6ec..bd2297da 100755 --- a/compiler/tests/04_pand2_test.py +++ b/compiler/tests/04_pand2_test.py @@ -11,9 +11,9 @@ Run a regression test on a pand2 cell """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -39,4 +39,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/04_pbitcell_test.py b/compiler/tests/04_pbitcell_test.py index e8b7cb55..77e4a313 100755 --- a/compiler/tests/04_pbitcell_test.py +++ b/compiler/tests/04_pbitcell_test.py @@ -11,9 +11,9 @@ Run regresion tests on a parameterized bitcell """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS import debug @@ -114,4 +114,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/04_pbuf_test.py b/compiler/tests/04_pbuf_test.py index 9eeaaeab..988723a1 100755 --- a/compiler/tests/04_pbuf_test.py +++ b/compiler/tests/04_pbuf_test.py @@ -11,9 +11,9 @@ Run a regression test on a 2-row buffer cell """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -35,4 +35,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/04_pdriver_test.py b/compiler/tests/04_pdriver_test.py index ecd697c9..c08ecda9 100755 --- a/compiler/tests/04_pdriver_test.py +++ b/compiler/tests/04_pdriver_test.py @@ -11,9 +11,9 @@ Run a regression test on a 2-row buffer cell """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -51,4 +51,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/04_pinv_10x_test.py b/compiler/tests/04_pinv_10x_test.py index 0548cbf4..51caecaf 100755 --- a/compiler/tests/04_pinv_10x_test.py +++ b/compiler/tests/04_pinv_10x_test.py @@ -11,9 +11,9 @@ Run regression tests on a parameterized inverter """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -36,4 +36,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/04_pinv_1x_beta_test.py b/compiler/tests/04_pinv_1x_beta_test.py index 1f8aae26..5b993f8d 100755 --- a/compiler/tests/04_pinv_1x_beta_test.py +++ b/compiler/tests/04_pinv_1x_beta_test.py @@ -11,9 +11,9 @@ Run regression tests on a parameterized inverter """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -35,4 +35,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/04_pinv_1x_test.py b/compiler/tests/04_pinv_1x_test.py index fd70d8dc..46f1ca08 100755 --- a/compiler/tests/04_pinv_1x_test.py +++ b/compiler/tests/04_pinv_1x_test.py @@ -10,9 +10,9 @@ Run regression tests on a parameterized inverter """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -34,4 +34,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/04_pinv_2x_test.py b/compiler/tests/04_pinv_2x_test.py index 6b472f9e..cf65c2eb 100755 --- a/compiler/tests/04_pinv_2x_test.py +++ b/compiler/tests/04_pinv_2x_test.py @@ -11,9 +11,9 @@ Run regression tests on a parameterized inverter """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -36,4 +36,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/04_pinvbuf_test.py b/compiler/tests/04_pinvbuf_test.py index ea407d0c..40db6c2b 100755 --- a/compiler/tests/04_pinvbuf_test.py +++ b/compiler/tests/04_pinvbuf_test.py @@ -11,9 +11,9 @@ Run a regression test on a 2-row buffer cell """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -35,4 +35,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/04_pnand2_test.py b/compiler/tests/04_pnand2_test.py index 527c6204..8aa94f1f 100755 --- a/compiler/tests/04_pnand2_test.py +++ b/compiler/tests/04_pnand2_test.py @@ -13,9 +13,9 @@ size 2-input nand gate. """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -38,4 +38,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/04_pnand3_test.py b/compiler/tests/04_pnand3_test.py index 6dba468a..e0da23f9 100755 --- a/compiler/tests/04_pnand3_test.py +++ b/compiler/tests/04_pnand3_test.py @@ -13,9 +13,9 @@ It generates only a minimum size 3-input nand gate. """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -38,4 +38,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/04_pnor2_test.py b/compiler/tests/04_pnor2_test.py index 8a66324d..6b245941 100755 --- a/compiler/tests/04_pnor2_test.py +++ b/compiler/tests/04_pnor2_test.py @@ -13,9 +13,9 @@ size 2-input nor gate. """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -37,4 +37,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/04_precharge_test.py b/compiler/tests/04_precharge_test.py index 162f1091..11065f71 100755 --- a/compiler/tests/04_precharge_test.py +++ b/compiler/tests/04_precharge_test.py @@ -11,9 +11,9 @@ Run a regression test on a precharge cell """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -57,4 +57,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/04_replica_pbitcell_test.py b/compiler/tests/04_replica_pbitcell_test.py index 1e028e40..da23bbce 100755 --- a/compiler/tests/04_replica_pbitcell_test.py +++ b/compiler/tests/04_replica_pbitcell_test.py @@ -11,9 +11,9 @@ Run a regression test on a replica pbitcell """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -51,4 +51,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/04_single_level_column_mux_test.py b/compiler/tests/04_single_level_column_mux_test.py index 151f2797..81a67995 100755 --- a/compiler/tests/04_single_level_column_mux_test.py +++ b/compiler/tests/04_single_level_column_mux_test.py @@ -11,9 +11,9 @@ Run a regression test on a wordline_driver array """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -54,4 +54,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/05_bitcell_1rw_1r_array_test.py b/compiler/tests/05_bitcell_1rw_1r_array_test.py index 9df2c8c3..21b6d1d6 100755 --- a/compiler/tests/05_bitcell_1rw_1r_array_test.py +++ b/compiler/tests/05_bitcell_1rw_1r_array_test.py @@ -11,9 +11,9 @@ Run a regression test on a basic array """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -41,4 +41,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/05_bitcell_array_test.py b/compiler/tests/05_bitcell_array_test.py index 21943a5d..9184f69d 100755 --- a/compiler/tests/05_bitcell_array_test.py +++ b/compiler/tests/05_bitcell_array_test.py @@ -11,9 +11,9 @@ Run a regression test on a basic array """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -37,4 +37,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/05_pbitcell_array_test.py b/compiler/tests/05_pbitcell_array_test.py index 45968266..05640dd7 100755 --- a/compiler/tests/05_pbitcell_array_test.py +++ b/compiler/tests/05_pbitcell_array_test.py @@ -11,9 +11,9 @@ Run a regression test on a basic array """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -56,4 +56,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/06_hierarchical_decoder_test.py b/compiler/tests/06_hierarchical_decoder_test.py index bcc22ce8..02726aeb 100755 --- a/compiler/tests/06_hierarchical_decoder_test.py +++ b/compiler/tests/06_hierarchical_decoder_test.py @@ -11,9 +11,9 @@ Run a regression test on a hierarchical_decoder. """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -80,4 +80,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/06_hierarchical_predecode2x4_test.py b/compiler/tests/06_hierarchical_predecode2x4_test.py index e4687d5e..f331fadf 100755 --- a/compiler/tests/06_hierarchical_predecode2x4_test.py +++ b/compiler/tests/06_hierarchical_predecode2x4_test.py @@ -11,9 +11,9 @@ Run a regression test on a hierarchical_predecode2x4. """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -46,4 +46,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/06_hierarchical_predecode3x8_test.py b/compiler/tests/06_hierarchical_predecode3x8_test.py index 12e87d06..763732c5 100755 --- a/compiler/tests/06_hierarchical_predecode3x8_test.py +++ b/compiler/tests/06_hierarchical_predecode3x8_test.py @@ -11,9 +11,9 @@ Run a regression test on a hierarchical_predecode3x8. """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -46,4 +46,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/07_single_level_column_mux_array_test.py b/compiler/tests/07_single_level_column_mux_array_test.py index 8da5f252..2a919f6a 100755 --- a/compiler/tests/07_single_level_column_mux_array_test.py +++ b/compiler/tests/07_single_level_column_mux_array_test.py @@ -10,9 +10,9 @@ Run a regression test on a single transistor column_mux. """ -from testutils import header,openram_test,unittest +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -68,4 +68,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/08_precharge_array_test.py b/compiler/tests/08_precharge_array_test.py index 86f308f4..4b406a74 100755 --- a/compiler/tests/08_precharge_array_test.py +++ b/compiler/tests/08_precharge_array_test.py @@ -11,9 +11,9 @@ Run a regression test on a precharge array """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -55,4 +55,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/08_wordline_driver_test.py b/compiler/tests/08_wordline_driver_test.py index 585b85cd..595f0ab3 100755 --- a/compiler/tests/08_wordline_driver_test.py +++ b/compiler/tests/08_wordline_driver_test.py @@ -11,9 +11,9 @@ Run a regression test on a wordline_driver array """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -49,4 +49,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/09_sense_amp_array_test.py b/compiler/tests/09_sense_amp_array_test.py index 12a20e8f..7c88ab1f 100755 --- a/compiler/tests/09_sense_amp_array_test.py +++ b/compiler/tests/09_sense_amp_array_test.py @@ -11,9 +11,9 @@ Run a regression test on a sense amp array """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -55,4 +55,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/10_write_driver_array_test.py b/compiler/tests/10_write_driver_array_test.py index f5d0c23c..af7b8557 100755 --- a/compiler/tests/10_write_driver_array_test.py +++ b/compiler/tests/10_write_driver_array_test.py @@ -11,9 +11,9 @@ Run a regression test on a write driver array """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -55,4 +55,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/11_dff_array_test.py b/compiler/tests/11_dff_array_test.py index fc48adce..bd5e12ca 100755 --- a/compiler/tests/11_dff_array_test.py +++ b/compiler/tests/11_dff_array_test.py @@ -11,9 +11,9 @@ Run a regression test on a dff_array. """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -43,4 +43,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/11_dff_buf_array_test.py b/compiler/tests/11_dff_buf_array_test.py index 7d614d1b..3a011258 100755 --- a/compiler/tests/11_dff_buf_array_test.py +++ b/compiler/tests/11_dff_buf_array_test.py @@ -11,9 +11,9 @@ Run a regression test on a dff_array. """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -43,4 +43,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/11_dff_buf_test.py b/compiler/tests/11_dff_buf_test.py index afb1f73b..e0c20191 100755 --- a/compiler/tests/11_dff_buf_test.py +++ b/compiler/tests/11_dff_buf_test.py @@ -11,9 +11,9 @@ Run a regression test on a dff_buf. """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -35,4 +35,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/12_tri_gate_array_test.py b/compiler/tests/12_tri_gate_array_test.py index 203c5f94..e3b96697 100755 --- a/compiler/tests/12_tri_gate_array_test.py +++ b/compiler/tests/12_tri_gate_array_test.py @@ -11,9 +11,9 @@ Run a regression test on a tri_gate_array. """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -39,4 +39,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/13_delay_chain_test.py b/compiler/tests/13_delay_chain_test.py index 498c1005..25f2ab4c 100755 --- a/compiler/tests/13_delay_chain_test.py +++ b/compiler/tests/13_delay_chain_test.py @@ -11,9 +11,9 @@ Run a test on a delay chain """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -35,4 +35,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/14_replica_bitline_multiport_test.py b/compiler/tests/14_replica_bitline_multiport_test.py index 947f9c52..3e3827c9 100755 --- a/compiler/tests/14_replica_bitline_multiport_test.py +++ b/compiler/tests/14_replica_bitline_multiport_test.py @@ -11,9 +11,9 @@ Run a test on a multiport replica bitline """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -67,4 +67,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/14_replica_bitline_test.py b/compiler/tests/14_replica_bitline_test.py index b5830d63..546f81ea 100755 --- a/compiler/tests/14_replica_bitline_test.py +++ b/compiler/tests/14_replica_bitline_test.py @@ -11,9 +11,9 @@ Run a test on a replica bitline """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -45,4 +45,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/16_control_logic_test.py b/compiler/tests/16_control_logic_test.py index ed8a0088..b701a47f 100755 --- a/compiler/tests/16_control_logic_test.py +++ b/compiler/tests/16_control_logic_test.py @@ -11,9 +11,9 @@ Run a regression test on a control_logic """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -70,4 +70,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/19_bank_select_test.py b/compiler/tests/19_bank_select_test.py index 5ea16052..339e1d99 100755 --- a/compiler/tests/19_bank_select_test.py +++ b/compiler/tests/19_bank_select_test.py @@ -11,9 +11,9 @@ Run a regression test on various srams """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -52,4 +52,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/19_multi_bank_test.py b/compiler/tests/19_multi_bank_test.py index 3139b4eb..46a2e5c5 100755 --- a/compiler/tests/19_multi_bank_test.py +++ b/compiler/tests/19_multi_bank_test.py @@ -11,9 +11,9 @@ Run a regression test on various srams """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -69,4 +69,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/19_pmulti_bank_test.py b/compiler/tests/19_pmulti_bank_test.py index f31e2608..62cd63fa 100755 --- a/compiler/tests/19_pmulti_bank_test.py +++ b/compiler/tests/19_pmulti_bank_test.py @@ -11,9 +11,9 @@ Run a regression test on various srams """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -74,4 +74,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/19_psingle_bank_test.py b/compiler/tests/19_psingle_bank_test.py index 22c3da2f..8829a170 100755 --- a/compiler/tests/19_psingle_bank_test.py +++ b/compiler/tests/19_psingle_bank_test.py @@ -11,9 +11,9 @@ Run a regression test on various srams """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -161,4 +161,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/19_single_bank_1rw_1r_test.py b/compiler/tests/19_single_bank_1rw_1r_test.py index fb0e1c66..9be071f3 100755 --- a/compiler/tests/19_single_bank_1rw_1r_test.py +++ b/compiler/tests/19_single_bank_1rw_1r_test.py @@ -11,9 +11,9 @@ Run a regression test on 1rw 1r sram bank """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -72,4 +72,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/19_single_bank_test.py b/compiler/tests/19_single_bank_test.py index 72e61c0d..5cf6e326 100755 --- a/compiler/tests/19_single_bank_test.py +++ b/compiler/tests/19_single_bank_test.py @@ -11,9 +11,9 @@ Run a regression test on various srams """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -67,4 +67,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/20_psram_1bank_2mux_1rw_1w_test.py b/compiler/tests/20_psram_1bank_2mux_1rw_1w_test.py index 4bdad91f..a0ec81a0 100755 --- a/compiler/tests/20_psram_1bank_2mux_1rw_1w_test.py +++ b/compiler/tests/20_psram_1bank_2mux_1rw_1w_test.py @@ -11,9 +11,9 @@ Run a regression test on a 1 bank SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -57,4 +57,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/20_psram_1bank_2mux_1w_1r_test.py b/compiler/tests/20_psram_1bank_2mux_1w_1r_test.py index a0b2b242..c642c1f5 100755 --- a/compiler/tests/20_psram_1bank_2mux_1w_1r_test.py +++ b/compiler/tests/20_psram_1bank_2mux_1w_1r_test.py @@ -11,9 +11,9 @@ Run a regression test on a 1 bank SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -55,4 +55,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/20_psram_1bank_2mux_test.py b/compiler/tests/20_psram_1bank_2mux_test.py index c718daa3..f9ecaa42 100755 --- a/compiler/tests/20_psram_1bank_2mux_test.py +++ b/compiler/tests/20_psram_1bank_2mux_test.py @@ -11,9 +11,9 @@ Run a regression test on a 1 bank SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -58,4 +58,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/20_psram_1bank_4mux_1rw_1r_test.py b/compiler/tests/20_psram_1bank_4mux_1rw_1r_test.py index f415bd77..0bfe26cd 100755 --- a/compiler/tests/20_psram_1bank_4mux_1rw_1r_test.py +++ b/compiler/tests/20_psram_1bank_4mux_1rw_1r_test.py @@ -11,9 +11,9 @@ Run a regression test on a 1 bank SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -56,4 +56,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/20_sram_1bank_2mux_1rw_1r_test.py b/compiler/tests/20_sram_1bank_2mux_1rw_1r_test.py index 46725bc5..108cd44c 100755 --- a/compiler/tests/20_sram_1bank_2mux_1rw_1r_test.py +++ b/compiler/tests/20_sram_1bank_2mux_1rw_1r_test.py @@ -11,9 +11,9 @@ Run a regression test on a 1 bank, 2 port SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -56,4 +56,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/20_sram_1bank_2mux_1w_1r_test.py b/compiler/tests/20_sram_1bank_2mux_1w_1r_test.py index fec42aeb..b0ca96e2 100755 --- a/compiler/tests/20_sram_1bank_2mux_1w_1r_test.py +++ b/compiler/tests/20_sram_1bank_2mux_1w_1r_test.py @@ -11,9 +11,9 @@ Run a regression test on a 1 bank SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -57,4 +57,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/20_sram_1bank_2mux_test.py b/compiler/tests/20_sram_1bank_2mux_test.py index c61ebe4f..db67d980 100755 --- a/compiler/tests/20_sram_1bank_2mux_test.py +++ b/compiler/tests/20_sram_1bank_2mux_test.py @@ -11,9 +11,9 @@ Run a regression test on a 1 bank SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -50,4 +50,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/20_sram_1bank_4mux_test.py b/compiler/tests/20_sram_1bank_4mux_test.py index 5d10903c..b5e2df8a 100755 --- a/compiler/tests/20_sram_1bank_4mux_test.py +++ b/compiler/tests/20_sram_1bank_4mux_test.py @@ -11,9 +11,9 @@ Run a regression test on a 1 bank SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -50,4 +50,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/20_sram_1bank_8mux_1rw_1r_test.py b/compiler/tests/20_sram_1bank_8mux_1rw_1r_test.py index 3a2c34e6..1924f674 100755 --- a/compiler/tests/20_sram_1bank_8mux_1rw_1r_test.py +++ b/compiler/tests/20_sram_1bank_8mux_1rw_1r_test.py @@ -11,9 +11,9 @@ Run a regression test on a 1 bank SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -56,4 +56,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/20_sram_1bank_8mux_test.py b/compiler/tests/20_sram_1bank_8mux_test.py index 94c073f9..b1809e8a 100755 --- a/compiler/tests/20_sram_1bank_8mux_test.py +++ b/compiler/tests/20_sram_1bank_8mux_test.py @@ -11,9 +11,9 @@ Run a regression test on a 1 bank SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -50,4 +50,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/20_sram_1bank_nomux_1rw_1r_test.py b/compiler/tests/20_sram_1bank_nomux_1rw_1r_test.py index 2ce13456..ffc326af 100755 --- a/compiler/tests/20_sram_1bank_nomux_1rw_1r_test.py +++ b/compiler/tests/20_sram_1bank_nomux_1rw_1r_test.py @@ -11,9 +11,9 @@ Run a regression test on a 1 bank, 2 port SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -56,4 +56,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/20_sram_1bank_nomux_test.py b/compiler/tests/20_sram_1bank_nomux_test.py index 272d16ee..77d97178 100755 --- a/compiler/tests/20_sram_1bank_nomux_test.py +++ b/compiler/tests/20_sram_1bank_nomux_test.py @@ -11,9 +11,9 @@ Run a regression test on a 1 bank SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -50,4 +50,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/20_sram_2bank_test.py b/compiler/tests/20_sram_2bank_test.py index b625f9ec..df68b623 100755 --- a/compiler/tests/20_sram_2bank_test.py +++ b/compiler/tests/20_sram_2bank_test.py @@ -11,9 +11,9 @@ Run a regression test on a 2 bank SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -100,4 +100,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/21_hspice_delay_test.py b/compiler/tests/21_hspice_delay_test.py index aa6cbf49..2008c097 100755 --- a/compiler/tests/21_hspice_delay_test.py +++ b/compiler/tests/21_hspice_delay_test.py @@ -11,9 +11,9 @@ Run a regression test on various srams """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -94,4 +94,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/21_hspice_setuphold_test.py b/compiler/tests/21_hspice_setuphold_test.py index 49c0d2cb..b8f81cf5 100755 --- a/compiler/tests/21_hspice_setuphold_test.py +++ b/compiler/tests/21_hspice_setuphold_test.py @@ -11,9 +11,9 @@ Run a regression test on various srams """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -65,4 +65,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/21_model_delay_test.py b/compiler/tests/21_model_delay_test.py index c54a9118..ae6d2800 100755 --- a/compiler/tests/21_model_delay_test.py +++ b/compiler/tests/21_model_delay_test.py @@ -11,9 +11,9 @@ Run a regression test on various srams """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -82,4 +82,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/21_ngspice_delay_test.py b/compiler/tests/21_ngspice_delay_test.py index c12d3835..24ed01ca 100755 --- a/compiler/tests/21_ngspice_delay_test.py +++ b/compiler/tests/21_ngspice_delay_test.py @@ -11,9 +11,9 @@ Run a regression test on various srams """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -95,4 +95,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/21_ngspice_setuphold_test.py b/compiler/tests/21_ngspice_setuphold_test.py index abf64d33..91c9e220 100755 --- a/compiler/tests/21_ngspice_setuphold_test.py +++ b/compiler/tests/21_ngspice_setuphold_test.py @@ -11,9 +11,9 @@ Run a regression test on various srams """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -66,4 +66,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/22_psram_1bank_2mux_func_test.py b/compiler/tests/22_psram_1bank_2mux_func_test.py index 4a99f009..95f21297 100755 --- a/compiler/tests/22_psram_1bank_2mux_func_test.py +++ b/compiler/tests/22_psram_1bank_2mux_func_test.py @@ -11,9 +11,9 @@ Run a regression test on various srams """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -71,4 +71,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/22_psram_1bank_4mux_func_test.py b/compiler/tests/22_psram_1bank_4mux_func_test.py index 9eaa2671..fb007c56 100755 --- a/compiler/tests/22_psram_1bank_4mux_func_test.py +++ b/compiler/tests/22_psram_1bank_4mux_func_test.py @@ -11,9 +11,9 @@ Run a regression test on various srams """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -71,4 +71,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/22_psram_1bank_8mux_func_test.py b/compiler/tests/22_psram_1bank_8mux_func_test.py index a0d52d1b..491e2e53 100755 --- a/compiler/tests/22_psram_1bank_8mux_func_test.py +++ b/compiler/tests/22_psram_1bank_8mux_func_test.py @@ -11,9 +11,9 @@ Run a regression test on various srams """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -71,4 +71,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/22_psram_1bank_nomux_func_test.py b/compiler/tests/22_psram_1bank_nomux_func_test.py index 7b76e0da..e41223fd 100755 --- a/compiler/tests/22_psram_1bank_nomux_func_test.py +++ b/compiler/tests/22_psram_1bank_nomux_func_test.py @@ -11,9 +11,9 @@ Run a functioal test on 1 bank SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -71,4 +71,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/22_sram_1bank_2mux_func_test.py b/compiler/tests/22_sram_1bank_2mux_func_test.py index e5fa9280..2123f280 100755 --- a/compiler/tests/22_sram_1bank_2mux_func_test.py +++ b/compiler/tests/22_sram_1bank_2mux_func_test.py @@ -11,9 +11,9 @@ Run a regression test on various srams """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -63,4 +63,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/22_sram_1bank_4mux_func_test.py b/compiler/tests/22_sram_1bank_4mux_func_test.py index dc06a882..d1c2c8ea 100755 --- a/compiler/tests/22_sram_1bank_4mux_func_test.py +++ b/compiler/tests/22_sram_1bank_4mux_func_test.py @@ -11,9 +11,9 @@ Run a regression test on various srams """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -63,4 +63,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/22_sram_1bank_8mux_func_test.py b/compiler/tests/22_sram_1bank_8mux_func_test.py index ee3449ab..b789e416 100755 --- a/compiler/tests/22_sram_1bank_8mux_func_test.py +++ b/compiler/tests/22_sram_1bank_8mux_func_test.py @@ -11,9 +11,9 @@ Run a regression test on various srams """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -66,4 +66,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/22_sram_1bank_nomux_func_test.py b/compiler/tests/22_sram_1bank_nomux_func_test.py index bc626858..7183e2ea 100755 --- a/compiler/tests/22_sram_1bank_nomux_func_test.py +++ b/compiler/tests/22_sram_1bank_nomux_func_test.py @@ -11,9 +11,9 @@ Run a functioal test on 1 bank SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -60,4 +60,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/22_sram_1rw_1r_1bank_nomux_func_test.py b/compiler/tests/22_sram_1rw_1r_1bank_nomux_func_test.py index 0b8bffcc..9742da24 100755 --- a/compiler/tests/22_sram_1rw_1r_1bank_nomux_func_test.py +++ b/compiler/tests/22_sram_1rw_1r_1bank_nomux_func_test.py @@ -11,9 +11,9 @@ Run a functioal test on 1 bank SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -68,4 +68,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/23_lib_sram_model_corners_test.py b/compiler/tests/23_lib_sram_model_corners_test.py index 85d96a73..906f1ec1 100755 --- a/compiler/tests/23_lib_sram_model_corners_test.py +++ b/compiler/tests/23_lib_sram_model_corners_test.py @@ -11,9 +11,9 @@ Check the .lib file for an SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os,re -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS import debug @@ -70,7 +70,7 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/23_lib_sram_model_test.py b/compiler/tests/23_lib_sram_model_test.py index e1727794..56f7f2e9 100755 --- a/compiler/tests/23_lib_sram_model_test.py +++ b/compiler/tests/23_lib_sram_model_test.py @@ -11,9 +11,9 @@ Check the .lib file for an SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os,re -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS import debug @@ -60,7 +60,7 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/23_lib_sram_prune_test.py b/compiler/tests/23_lib_sram_prune_test.py index 0d33d1af..470dfdcf 100755 --- a/compiler/tests/23_lib_sram_prune_test.py +++ b/compiler/tests/23_lib_sram_prune_test.py @@ -11,9 +11,9 @@ Check the .lib file for an SRAM with pruning """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os,re -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS import debug @@ -71,7 +71,7 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/23_lib_sram_test.py b/compiler/tests/23_lib_sram_test.py index 6f2bf0b7..0aca746f 100755 --- a/compiler/tests/23_lib_sram_test.py +++ b/compiler/tests/23_lib_sram_test.py @@ -11,9 +11,9 @@ Check the .lib file for an SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os,re -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS import debug @@ -70,7 +70,7 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/24_lef_sram_test.py b/compiler/tests/24_lef_sram_test.py index 362495d7..6c9c4536 100755 --- a/compiler/tests/24_lef_sram_test.py +++ b/compiler/tests/24_lef_sram_test.py @@ -11,9 +11,9 @@ Check the LEF file for an SRMA """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS import debug @@ -54,4 +54,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/25_verilog_sram_test.py b/compiler/tests/25_verilog_sram_test.py index 0bbe45b7..30c6e5ca 100755 --- a/compiler/tests/25_verilog_sram_test.py +++ b/compiler/tests/25_verilog_sram_test.py @@ -11,9 +11,9 @@ Check the .v file for an SRAM """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS import debug @@ -51,4 +51,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/26_pex_test.py b/compiler/tests/26_pex_test.py index 5d26d26e..9541f720 100755 --- a/compiler/tests/26_pex_test.py +++ b/compiler/tests/26_pex_test.py @@ -11,9 +11,9 @@ Run a regression test on an extracted SRAM to ensure functionality. """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -319,4 +319,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/30_openram_back_end_test.py b/compiler/tests/30_openram_back_end_test.py index d5cbe0af..2ebc9f15 100755 --- a/compiler/tests/30_openram_back_end_test.py +++ b/compiler/tests/30_openram_back_end_test.py @@ -13,9 +13,9 @@ check that these files are right. """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os,re,shutil -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -100,4 +100,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/30_openram_front_end_test.py b/compiler/tests/30_openram_front_end_test.py index 006d1bf3..8058153f 100755 --- a/compiler/tests/30_openram_front_end_test.py +++ b/compiler/tests/30_openram_front_end_test.py @@ -6,9 +6,9 @@ check that these files are right. """ import unittest -from testutils import header,openram_test +from testutils import * import sys,os,re,shutil -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals from globals import OPTS from sram_factory import factory @@ -99,4 +99,4 @@ if __name__ == "__main__": (OPTS, args) = globals.parse_args() del sys.argv[1:] header(__file__, OPTS.tech_name) - unittest.main() + unittest.main(testRunner=debugTestRunner()) diff --git a/compiler/tests/regress.py b/compiler/tests/regress.py index c6591cf4..a77cb86b 100755 --- a/compiler/tests/regress.py +++ b/compiler/tests/regress.py @@ -10,13 +10,13 @@ import re import unittest import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) import globals (OPTS, args) = globals.parse_args() del sys.argv[1:] -from testutils import header,openram_test +from testutils import * header(__file__, OPTS.tech_name) # get a list of all files in the tests directory diff --git a/compiler/tests/testutils.py b/compiler/tests/testutils.py index dfe34361..c6da0d49 100644 --- a/compiler/tests/testutils.py +++ b/compiler/tests/testutils.py @@ -6,9 +6,10 @@ #All rights reserved. # import unittest,warnings +import pdb,traceback import sys,os,glob,copy import shutil -sys.path.append(os.path.join(sys.path[0],"..")) +sys.path.append(os.getenv("OPENRAM_HOME")) from globals import OPTS import debug @@ -296,3 +297,19 @@ def header(filename, technology): from globals import OPTS print("|=========" + OPTS.openram_temp.center(60) + "=========|") print("|==============================================================================|") + +def debugTestRunner(post_mortem=None): + """unittest runner doing post mortem debugging on failing tests""" + if post_mortem is None: + post_mortem = pdb.post_mortem + class DebugTestResult(unittest.TextTestResult): + def addError(self, test, err): + # called before tearDown() + traceback.print_exception(*err) + post_mortem(err[2]) + super(DebugTestResult, self).addError(test, err) + def addFailure(self, test, err): + traceback.print_exception(*err) + post_mortem(err[2]) + super(DebugTestResult, self).addFailure(test, err) + return unittest.TextTestRunner(resultclass=DebugTestResult)