diff --git a/pyproject.toml b/pyproject.toml index 47d2b6d..34e85f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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: diff --git a/src/fpga_sim/fpga_sim.py b/src/fpga_sim/fpga_sim.py index a2efb2c..8929e14 100644 --- a/src/fpga_sim/fpga_sim.py +++ b/src/fpga_sim/fpga_sim.py @@ -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"]}")