K1Guitar/tools/k1_harness/suites/__init__.py

27 lines
929 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding: utf-8 -*-
"""套件注册表。每个套件模块提供 run(report, ctx) -> None.
ctx 字段cli 注入):
transport: "com" | "ble" —— app 套件使用
port: str —— COM 端口transport=com 时必填)
baud: int
device: str —— J-Link 器件名
allow_poweroff: bool —— @destructive 用例开关
dump_png: str —— ui 套件可选截图输出路径
"""
from __future__ import annotations
from . import app_protocol, ble_smoke, keys_tm1629, keys_tm1617, packs_bin123, ui_nav
# name -> (module, 需要的资源标签)
SUITES = {
"app": (app_protocol, {"transport"}),
"ble": (ble_smoke, {"ble"}),
"keys": (keys_tm1629, {"rtt"}),
"keys1617": (keys_tm1617, {"rtt"}),
"packs": (packs_bin123, {"rtt"}),
"ui": (ui_nav, {"rtt"}),
}
ALL_ORDER = ("app", "ble", "keys", "packs", "ui", "keys1617")