add single test hack

This commit is contained in:
Byron Lathi
2024-12-01 18:13:12 -08:00
parent d03e7a127b
commit aa44385263
2 changed files with 13 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ name = "fpga-sim" # REQUIRED, is the only field that cannot be marked as dynami
# https://packaging.python.org/guides/single-sourcing-package-version/
# dynamic = ["version"]
version = "0.1.0" # REQUIRED, although can be dynamic
version = "0.1.1" # REQUIRED, although can be dynamic
# This is a one-line description or tagline of what your project does. This
# corresponds to the "Summary" metadata field:

View File

@@ -21,9 +21,12 @@ def fpga_sim_main():
)
parser.add_argument("yaml")
parser.add_argument("test_name", nargs="?")
args = parser.parse_args()
print(args.test_name)
# print(args.yaml)
with open(args.yaml) as cfg_file:
@@ -77,9 +80,17 @@ def fpga_sim_main():
os.environ["MAKEFLAGS"] = "-j"
tests_to_run = []
if args.test_name is not None:
for test in tests:
if test["name"] == args.test_name:
tests_to_run.append(test)
else:
tests_to_run = tests
# Turn this into a multiprocessing pool
for test in tests:
for test in tests_to_run:
sources = rtl_manifest.read_sources(f"{test["base_path"]}/{test["sources"]}")