areusch commented on a change in pull request #8940:
URL: https://github.com/apache/tvm/pull/8940#discussion_r705502904



##########
File path: tests/micro/zephyr/conftest.py
##########
@@ -20,33 +20,44 @@
 
 import pytest
 
+from tvm.micro import project
 import tvm.contrib.utils
 import tvm.target.target
 
-# The models that should pass this configuration. Maps a short, identifying 
platform string to
-# (model, zephyr_board).
-PLATFORMS = {
-    "qemu_x86": ("host", "qemu_x86"),
-    "qemu_riscv32": ("host", "qemu_riscv32"),
-    "qemu_riscv64": ("host", "qemu_riscv64"),
-    "mps2_an521": ("mps2_an521", "mps2_an521"),
-    "nrf5340dk": ("nrf5340dk", "nrf5340dk_nrf5340_cpuapp"),
-    "stm32f746xx_disco": ("stm32f746xx", "stm32f746g_disco"),
-    "stm32f746xx_nucleo": ("stm32f746xx", "nucleo_f746zg"),
-    "stm32l4r5zi_nucleo": ("stm32l4r5zi", "nucleo_l4r5zi"),
-    "zynq_mp_r5": ("zynq_mp_r5", "qemu_cortex_r5"),
-}
+TEMPLATE_PROJECT_DIR = (
+    pathlib.Path(__file__).parent
+    / ".."
+    / ".."
+    / ".."
+    / "apps"
+    / "microtvm"
+    / "zephyr"
+    / "template_project"
+).resolve()
+
+
+def zephyr_boards() -> dict:
+    """Returns a dict mapping board to target model"""
+    template = project.TemplateProject.from_directory(TEMPLATE_PROJECT_DIR)
+    project_options = template.info()["project_options"]
+    for option in project_options:

Review comment:
       perhaps we should make a helper for this, can be a follow-on




-- 
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: commits-unsubscr...@tvm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to