siso: cover apply_metrics_labels and apply_telemetry_flags functions with tests.

Bug: b/459690822

Change-Id: Iccb5b83e8572afa8d6a66252fc69cf766a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7141140
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
This commit is contained in:
Alex Ovsienko
2025-11-16 21:57:17 -08:00
committed by LUCI CQ
parent 3d559609b4
commit ca5576a48f
2 changed files with 139 additions and 2 deletions

View File

@@ -22,6 +22,9 @@ import caffeinate
import gclient_paths
_SYSTEM_DICT = {"Windows": "windows", "Darwin": "mac", "Linux": "linux"}
def parse_args(args):
subcmd = ''
out_dir = "."
@@ -55,8 +58,7 @@ def check_outdir(subcmd, out_dir):
def apply_metrics_labels(args: list[str]) -> list[str]:
system_dict = {"Windows": "windows", "Darwin": "mac", "Linux": "linux"}
user_system = system_dict.get(platform.system(), platform.system())
user_system = _SYSTEM_DICT.get(platform.system(), platform.system())
# TODO(ovsienko) - add targets to the processing. For this, the Siso needs to understand lists.
for arg in args[1:]: