Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scripts/pylib/twister/twisterlib/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import xml.etree.ElementTree as ET
from datetime import datetime
from enum import Enum
from pathlib import PosixPath
from pathlib import Path, PosixPath

from colorama import Fore
from twisterlib.statuses import TwisterStatus
Expand Down Expand Up @@ -171,7 +171,7 @@ def xunit_report_suites(self, json_file, filename):
runnable = suite.get('runnable', 0)
duration += float(handler_time)
ts_status = TwisterStatus(suite.get('status'))
classname = PosixPath(suite.get("name","")).name
classname = Path(suite.get("name","")).name
for tc in suite.get("testcases", []):
status = TwisterStatus(tc.get('status'))
reason = tc.get('reason', suite.get('reason', 'Unknown'))
Expand Down Expand Up @@ -253,7 +253,7 @@ def xunit_report(self, json_file, filename, selected_platform=None, full_report=
):
continue
if full_report:
classname = PosixPath(ts.get("name","")).name
classname = Path(ts.get("name","")).name
for tc in ts.get("testcases", []):
status = TwisterStatus(tc.get('status'))
reason = tc.get('reason', ts.get('reason', 'Unknown'))
Expand Down
Loading