add single test hack
This commit is contained in:
@@ -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/
|
# https://packaging.python.org/guides/single-sourcing-package-version/
|
||||||
|
|
||||||
# dynamic = ["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
|
# This is a one-line description or tagline of what your project does. This
|
||||||
# corresponds to the "Summary" metadata field:
|
# corresponds to the "Summary" metadata field:
|
||||||
|
|||||||
@@ -21,9 +21,12 @@ def fpga_sim_main():
|
|||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument("yaml")
|
parser.add_argument("yaml")
|
||||||
|
parser.add_argument("test_name", nargs="?")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
print(args.test_name)
|
||||||
|
|
||||||
# print(args.yaml)
|
# print(args.yaml)
|
||||||
|
|
||||||
with open(args.yaml) as cfg_file:
|
with open(args.yaml) as cfg_file:
|
||||||
@@ -77,9 +80,17 @@ def fpga_sim_main():
|
|||||||
|
|
||||||
os.environ["MAKEFLAGS"] = "-j"
|
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
|
# 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"]}")
|
sources = rtl_manifest.read_sources(f"{test["base_path"]}/{test["sources"]}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user