diff --git a/compiler/tests/Makefile b/compiler/tests/Makefile index 7351a424..bfa2ab8e 100644 --- a/compiler/tests/Makefile +++ b/compiler/tests/Makefile @@ -15,28 +15,14 @@ TEST_STAMPS= $(addsuffix .ok,$(TEST_BASES)) OPENRAM_DIR = $(OPENRAM_HOME)/tests RESULTS_DIR = $(OPENRAM_DIR)/results + + # Use % for all techs: # %/test.py # or a specific tech: # freepdk45/test.py BROKEN_STAMPS = \ - sky130/01_library_test.ok \ - sky130/04_column_mux_pbitcell_test.ok \ - sky130/04_dummy_pbitcell_test.ok \ - sky130/04_pbitcell_test.ok \ - sky130/04_pnand4_test.ok \ - sky130/04_pand4_test.ok \ - sky130/04_precharge_pbitcell_test.ok \ - sky130/04_replica_pbitcell_test.ok \ - sky130/05_pbitcell_array_test.ok \ - sky130/05_bitcell_array_test.ok \ - sky130/05_bitcell_array_1rw_1r_test.ok \ - sky130/05_dummy_array_test.ok \ %/06_hierarchical_decoder_4096row_test.ok \ - sky130/07_column_mux_array_pbitcell_test.ok \ - sky130/19_pmulti_bank_test.ok \ - sky130/19_psingle_bank_test.ok \ - sky130/19_bank_select_pbitcell_test.ok \ %/19_single_bank_16mux_1rw_1r_test.ok \ %/19_single_bank_16mux_test.ok \ %/20_sram_1bank_16mux_1rw_1r_test.ok \ @@ -47,11 +33,6 @@ BROKEN_STAMPS = \ %/20_psram_1bank_2mux_test.ok \ %/21_hspice_delay_test.ok \ %/21_hspice_setuphold_test.ok \ - sky130/20_psram_1bank_4mux_1rw_1r_test.ok \ - sky130/22_psram_1bank_2mux_func_test.ok \ - sky130/22_psram_1bank_4mux_func_test.ok \ - sky130/22_psram_1bank_8mux_func_test.ok \ - sky130/22_psram_1bank_nomux_func_test.ok \ %/22_psram_1bank_2mux_func_test.ok \ %/22_psram_1bank_4mux_func_test.ok \ %/22_psram_1bank_8mux_func_test.ok \ @@ -66,11 +47,6 @@ BROKEN_STAMPS = \ %/22_sram_1bank_nomux_sparecols_func_test.ok \ %/22_sram_1bank_wmask_1rw_1r_func_test.ok \ %/22_sram_wmask_func_test.ok \ - sky130/23_lib_sram_linear_regression_test.ok \ - sky130/23_lib_sram_model_corners_test.ok \ - sky130/23_lib_sram_model_test.ok \ - sky130/23_lib_sram_prune_test.ok \ - sky131/23_lib_sram_test.ok \ %/26_hspice_pex_pinv_test.ok \ %/27_verilog_multibank_test.ok \ %/50_riscv_1k_1rw1r_func_test.ok \ @@ -87,6 +63,35 @@ BROKEN_STAMPS = \ %/50_riscv_512b_1rw_func_test.ok \ %/50_riscv_8k_1rw1r_func_test.ok \ %/50_riscv_8k_1rw_func_test.ok \ + freepdk45/21_xyce_delay_test.ok \ + scn4m_subm/19_single_bank_global_bitline_test.ok \ + scn4m_subm/21_xyce_delay_test.ok \ + sky130/01_library_test.ok \ + sky130/04_column_mux_pbitcell_test.ok \ + sky130/04_dummy_pbitcell_test.ok \ + sky130/04_pbitcell_test.ok \ + sky130/04_pnand4_test.ok \ + sky130/04_pand4_test.ok \ + sky130/04_precharge_pbitcell_test.ok \ + sky130/04_replica_pbitcell_test.ok \ + sky130/05_pbitcell_array_test.ok \ + sky130/05_bitcell_array_test.ok \ + sky130/05_bitcell_array_1rw_1r_test.ok \ + sky130/05_dummy_array_test.ok \ + sky130/07_column_mux_array_pbitcell_test.ok \ + sky130/19_pmulti_bank_test.ok \ + sky130/19_psingle_bank_test.ok \ + sky130/19_bank_select_pbitcell_test.ok \ + sky130/20_psram_1bank_4mux_1rw_1r_test.ok \ + sky130/22_psram_1bank_2mux_func_test.ok \ + sky130/22_psram_1bank_4mux_func_test.ok \ + sky130/22_psram_1bank_8mux_func_test.ok \ + sky130/22_psram_1bank_nomux_func_test.ok \ + sky130/23_lib_sram_linear_regression_test.ok \ + sky130/23_lib_sram_model_corners_test.ok \ + sky130/23_lib_sram_model_test.ok \ + sky130/23_lib_sram_prune_test.ok \ + sky131/23_lib_sram_test.ok gettech = $(word 1,$(subst /, ,$*)) getfile = $(word 2,$(subst /, ,$*)) diff --git a/compiler/tests/regress.py b/compiler/tests/regress.py deleted file mode 100755 index 4df495df..00000000 --- a/compiler/tests/regress.py +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/env python3 -# See LICENSE for licensing information. -# -# Copyright (c) 2016-2023 Regents of the University of California and The Board -# of Regents for the Oklahoma Agricultural and Mechanical College -# (acting for and on behalf of Oklahoma State University) -# All rights reserved. -# - -import re -import unittest -import sys, os -from openram import globals -from subunit import ProtocolTestCase, TestProtocolClient -from testtools import ConcurrentTestSuite - -(OPTS, args) = globals.parse_args() -del sys.argv[1:] - -from testutils import * -header(__file__, OPTS.tech_name) - -# get a list of all files in the tests directory -files = os.listdir(sys.path[0]) - -# load a file with all tests to skip in a given technology -# since tech_name is dynamically loaded, we can't use @skip directives -try: - skip_file_name = "{0}/tests/skip_tests_{1}.txt".format(os.getenv("OPENRAM_HOME"), OPTS.tech_name) - skip_file = open(skip_file_name, "r") - skip_tests = skip_file.read().splitlines() - for st in skip_tests: - debug.warning("Skipping: " + st) -except FileNotFoundError: - skip_tests = [] - -# assume any file that ends in "test.py" in it is a regression test -nametest = re.compile("test\.py$", re.IGNORECASE) -all_tests = list(filter(nametest.search, files)) -filtered_tests = list(filter(lambda i: i not in skip_tests, all_tests)) -filtered_tests.sort() - -num_threads = OPTS.num_threads - - -def partition_unit_tests(suite, num_threads): - partitions = [list() for x in range(num_threads)] - for index, test in enumerate(suite): - partitions[index % num_threads].append(test) - return partitions - - -def fork_tests(num_threads): - results = [] - test_partitions = partition_unit_tests(suite, num_threads) - suite._tests[:] = [] - - def do_fork(suite): - - for test_partition in test_partitions: - test_suite = unittest.TestSuite(test_partition) - test_partition[:] = [] - c2pread, c2pwrite = os.pipe() - pid = os.fork() - if pid == 0: - # PID of 0 is a child - try: - # Open a stream to write to the parent - stream = os.fdopen(c2pwrite, 'wb', 0) - os.close(c2pread) - sys.stdin.close() - test_suite_result = TestProtocolClient(stream) - test_suite.run(test_suite_result) - except EBADF: - try: - stream.write(traceback.format_exc()) - finally: - os._exit(1) - os._exit(0) - else: - # PID >0 is the parent - # Collect all of the child streams and append to the results - os.close(c2pwrite) - stream = os.fdopen(c2pread, 'rb', 0) - test = ProtocolTestCase(stream) - results.append(test) - return results - return do_fork - - -# import all of the modules -filenameToModuleName = lambda f: os.path.splitext(f)[0] -moduleNames = map(filenameToModuleName, filtered_tests) -modules = map(__import__, moduleNames) - -suite = unittest.TestSuite() -load = unittest.defaultTestLoader.loadTestsFromModule -suite.addTests(map(load, modules)) - -test_runner = unittest.TextTestRunner(verbosity=2, stream=sys.stderr) -if num_threads == 1: - final_suite = suite -else: - final_suite = ConcurrentTestSuite(suite, fork_tests(num_threads)) - -test_result = test_runner.run(final_suite) - -# import verify -# verify.print_drc_stats() -# verify.print_lvs_stats() -# verify.print_pex_stats() - -sys.exit(not test_result.wasSuccessful()) diff --git a/compiler/tests/skip_tests_freepdk45.txt b/compiler/tests/skip_tests_freepdk45.txt deleted file mode 100644 index 145cf857..00000000 --- a/compiler/tests/skip_tests_freepdk45.txt +++ /dev/null @@ -1 +0,0 @@ -21_xyce_delay_test.py diff --git a/compiler/tests/skip_tests_scn4m_subm.txt b/compiler/tests/skip_tests_scn4m_subm.txt deleted file mode 100644 index c3fb3138..00000000 --- a/compiler/tests/skip_tests_scn4m_subm.txt +++ /dev/null @@ -1,2 +0,0 @@ -19_single_bank_global_bitline_test.py -21_xyce_delay_test.py diff --git a/compiler/tests/skip_tests_sky130.txt b/compiler/tests/skip_tests_sky130.txt deleted file mode 100644 index b0cba8aa..00000000 --- a/compiler/tests/skip_tests_sky130.txt +++ /dev/null @@ -1,86 +0,0 @@ -04_dummy_pbitcell_test.py -04_pbitcell_test.py -04_precharge_pbitcell_test.py -04_replica_pbitcell_test.py -04_column_mux_pbitcell_test.py -05_bitcell_array_test.py -05_dummy_array_test.py -05_pbitcell_array_test.py -06_hierarchical_decoder_pbitcell_test.py -06_hierarchical_decoder_test.py -06_hierarchical_predecode2x4_pbitcell_test.py -06_hierarchical_predecode2x4_test.py -06_hierarchical_predecode3x8_pbitcell_test.py -06_hierarchical_predecode3x8_test.py -06_hierarchical_predecode4x16_test.py -07_column_mux_array_pbitcell_test.py -08_wordline_driver_array_pbitcell_test.py -08_wordline_driver_array_test.py -09_sense_amp_array_test_pbitcell.py -09_sense_amp_array_test.py -10_write_driver_array_pbitcell_test.py -10_write_driver_array_test.py -10_write_driver_array_wmask_pbitcell_test.py -10_write_driver_array_wmask_test.py -10_write_mask_and_array_pbitcell_test.py -10_write_mask_and_array_test.py -12_tri_gate_array_test.py -14_replica_pbitcell_array_test.py -14_replica_bitcell_array_test.py -14_replica_column_test.py -14_replica_column_1rw_1r_test.py -18_port_address_test.py -18_port_data_test.py -18_port_data_wmask_test.py -19_bank_select_pbitcell_test.py -19_bank_select_test.py -19_psingle_bank_test.py -19_bank_select_pbitcell_test.py -19_pmulti_bank_test.py -19_multi_bank_test.py -19_psingle_bank_test.py -19_single_bank_1w_1r_test.py -19_single_bank_wmask_1rw_1r_test.py -19_single_bank_1rw_1r_test.py -19_single_bank_test.py -19_single_bank_wmask_test.py -20_psram_1bank_2mux_1rw_1w_test.py -20_psram_1bank_2mux_1rw_1w_wmask_test.py -20_psram_1bank_2mux_1w_1r_test.py -20_psram_1bank_2mux_test.py -20_psram_1bank_4mux_1rw_1r_test.py -20_sram_1bank_2mux_1w_1r_test.py -20_sram_1bank_2mux_test.py -20_sram_1bank_2mux_wmask_test.py -20_sram_1bank_32b_1024_wmask_test.py -20_sram_1bank_4mux_test.py -20_sram_1bank_8mux_test.py -20_sram_1bank_nomux_test.py -20_sram_1bank_nomux_wmask_test.py -20_sram_2bank_test.py -21_hspice_delay_test.py -21_hspice_setuphold_test.py -21_model_delay_test.py -21_ngspice_delay_test.py -21_ngspice_setuphold_test.py -22_psram_1bank_2mux_func_test.py -22_psram_1bank_4mux_func_test.py -22_psram_1bank_8mux_func_test.py -22_psram_1bank_nomux_func_test.py -22_sram_1bank_2mux_func_test.py -22_sram_1bank_4mux_func_test.py -22_sram_1bank_8mux_func_test.py -22_sram_1bank_nomux_func_test.py -22_sram_1rw_1r_1bank_nomux_func_test.py -22_sram_wmask_func_test.py -23_lib_sram_model_corners_test.py -23_lib_sram_model_test.py -23_lib_sram_prune_test.py -23_lib_sram_test.py -24_lef_sram_test.py -25_verilog_sram_test.py -26_hspice_pex_pinv_test.py -26_ngspice_pex_pinv_test.py -26_pex_test.py -30_openram_back_end_test.py -30_openram_front_end_test.py