From bcab1681c6643d43b0af511b96e6444f4ccdb908 Mon Sep 17 00:00:00 2001 From: Keith Short Date: Tue, 21 Oct 2025 09:51:03 -0600 Subject: [PATCH] twister: fix environment:os tag Set the environment:os tag to the return value of platform.system(), which is more useful than os.name() which always returns "posix". Signed-off-by: Keith Short --- scripts/pylib/twister/twisterlib/reports.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/pylib/twister/twisterlib/reports.py b/scripts/pylib/twister/twisterlib/reports.py index 43fc2311f241b..0bf3846503778 100644 --- a/scripts/pylib/twister/twisterlib/reports.py +++ b/scripts/pylib/twister/twisterlib/reports.py @@ -12,6 +12,7 @@ from datetime import datetime from enum import Enum from pathlib import Path +from platform import system as platform_system from colorama import Fore from twisterlib.statuses import TwisterStatus @@ -302,7 +303,7 @@ def json_report(self, filename, version="NA", platform=None, filters=None): report_options = self.env.non_default_options() report = {} - report["environment"] = {"os": os.name, + report["environment"] = {"os": platform_system(), "zephyr_version": version, "toolchain": self.env.toolchain, "commit_date": self.env.commit_date,