From d63d3d32703445dabc80a57f7502f341e9e03a76 Mon Sep 17 00:00:00 2001 From: Byron Lathi Date: Sat, 30 Nov 2024 00:33:59 -0800 Subject: [PATCH] Fix base path issue --- pyproject.toml | 2 +- src/fpga_sim/fpga_sim.py | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0450d72..c9049f6 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.0.4" # REQUIRED, although can be dynamic +version = "0.0.5" # 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 53c4abd..a4fd980 100644 --- a/src/fpga_sim/fpga_sim.py +++ b/src/fpga_sim/fpga_sim.py @@ -32,7 +32,6 @@ def fpga_sim_main(): # 2: Figure out which tests to run base_path = os.path.split(os.path.abspath(args.yaml))[0] - print(base_path) tests = [] @@ -41,11 +40,11 @@ def fpga_sim_main(): if test["type"] == "yaml": with open(f"{_base_path}/{test["yaml"]}") as _cfg_file: __cfg = yaml.safe_load(_cfg_file) - parse_cfg(__cfg, f"{base_path}/{os.path.split(test["yaml"])[0]}") + parse_cfg(__cfg, f"{_base_path}/{os.path.split(test["yaml"])[0]}") if test["type"] == "test": waves = test["waves"] if "waves" in test else None tests.append({ - "base_path": base_path, + "base_path": _base_path, "name": test["name"], "toplevel": test["toplevel"], "modules": test["modules"], @@ -82,7 +81,3 @@ def fpga_sim_main(): sys.path.append(test["base_path"]) runner.test(hdl_toplevel=test["toplevel"], test_module=test["modules"], waves=test["waves"], results_xml=result_xml) - - -if __name__ == "__main__": - main()