mehrdadh commented on a change in pull request #9663:
URL: https://github.com/apache/tvm/pull/9663#discussion_r764471742
##########
File path: tests/micro/common/test_tvmc.py
##########
@@ -118,17 +126,25 @@ def test_tvmc_model_build_only(board):
["micro", "build", project_dir, platform, "--project-option",
f"{platform}_board={board}"]
)
assert cmd_result == 0, "tvmc micro failed in step: build"
+ shutil.rmtree(output_dir)
@pytest.mark.requires_hardware
@tvm.testing.requires_micro
-def test_tvmc_model_run(board):
[email protected](
+ "output_dir,",
+ [pathlib.Path("./tvmc_relative_path_test"),
pathlib.Path(tempfile.mkdtemp())],
+)
+def test_tvmc_model_run(board, output_dir):
target, platform = _get_target_and_platform(board)
+ if not os.path.isabs(output_dir):
Review comment:
done.
##########
File path: python/tvm/driver/tvmc/micro.py
##########
@@ -236,18 +236,26 @@ def drive_micro(args):
args.subcommand_handler(args)
+def get_project_dir(args: argparse.Namespace) -> str:
Review comment:
moved the function and changed input type.
##########
File path: tests/micro/common/test_tvmc.py
##########
@@ -66,13 +67,20 @@ def test_tvmc_exist(board):
@tvm.testing.requires_micro
-def test_tvmc_model_build_only(board):
[email protected](
+ "output_dir,",
+ [pathlib.Path("./tvmc_relative_path_test"),
pathlib.Path(tempfile.mkdtemp())],
+)
+def test_tvmc_model_build_only(board, output_dir):
target, platform = _get_target_and_platform(board)
+ if not os.path.isabs(output_dir):
Review comment:
Thanks for catching this. Initially the test was correct, I added that
last piece to create the directory before running tvmc command which made the
test wrong. Now it should be correct. Please let me know
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]