leandron commented on a change in pull request #10678:
URL: https://github.com/apache/tvm/pull/10678#discussion_r831994708
##########
File path: apps/microtvm/zephyr/template_project/microtvm_api_server.py
##########
@@ -746,17 +746,15 @@ def open(self):
os.mkfifo(self.write_pipe)
os.mkfifo(self.read_pipe)
- if "gdbserver_port" in self.options:
- if "env" in self.kwargs:
- self.kwargs["env"] = copy.copy(self.kwargs["env"])
- else:
- self.kwargs["env"] = os.environ.copy()
-
- self.kwargs["env"]["TVM_QEMU_GDBSERVER_PORT"] =
str(self.options["gdbserver_port"])
+ env = None
+ if self.options.get("gdbserver_port"):
+ env = os.environ.copy()
+ env["TVM_QEMU_GDBSERVER_PORT"] = self.options["gdbserver_port"]
self.proc = subprocess.Popen(
["make", "run", f"QEMU_PIPE={self.pipe}"],
cwd=BUILD_DIR,
+ env=env,
Review comment:
Is it expected that in case we **don't** find "gdbserver_port" in the
environment, we'll then send an `env=None`, as set in line 749?
--
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]