INNER CODE UNIT · Python
TestCase
apache/ozone · dev-support/ci/junit_summary.py:46
class TestCase:
module: str
class_name: str
test_name: str
time: float
status: str # passed | failed | flaky | skipped
message: str = ""
def module_name(xml_path):
# Works for both layouts: <module>/target/surefire-reports/TEST-*.xml (normal run)
# and target/<check>/<module-path>/TEST-*.xml (failed tests moved by _mvn_unit_report.sh).
parts = os.path.normpath(xml_path).split(os.sep)[:-1]
while parts and parts[-1] in ("surefire-reports", "failsafe-reports", "target"):
parts.pop()
return parts[-1] if parts else "-"