Skip to content

Commit

Permalink
Fix pyright errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lukamac committed Dec 12, 2024
1 parent 163b67d commit 9605496
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,25 +107,25 @@ def assert_message(msg: str, test_name: str, stdout: str, stderr: Optional[str]
return retval


def build(nnxName: str, flow: Literal["make", "cmake"]) -> None:
def build(nnxName: NnxName, flow: Literal["make", "cmake"]) -> None:
env = os.environ

if flow == "make":
Path("app/src/nnx_layer.c").touch()
cmd = "make -C app all platform=gvsoc"
env["ACCELERATOR"] = nnxName
env["ACCELERATOR"] = str(nnxName)
elif flow == "cmake":
cmd = "cmake --build app/build"

subprocess.run(cmd.split(), check=True, capture_output=True, text=True, env=env)


def run(nnxName: str, flow: Literal["make", "cmake"]) -> str:
def run(nnxName: NnxName, flow: Literal["make", "cmake"]) -> str:
env = os.environ

if flow == "make":
cmd = "make -C app run platform=gvsoc"
env["ACCELERATOR"] = nnxName
env["ACCELERATOR"] = str(nnxName)
elif flow == "cmake":
build_dir = os.path.abspath(f"app/build_{nnxName}")
bin = os.path.join(build_dir, "test-pulp-nnx")
Expand Down

0 comments on commit 9605496

Please sign in to comment.