File size: 857 Bytes
0938148 31dadc6 0938148 f2f6076 0938148 f2f6076 0938148 6ec1d3e 0938148 f2f6076 31dadc6 0938148 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # ---------------------------------------------------------------------
# Copyright (c) 2025 Qualcomm Technologies, Inc. and/or its subsidiaries.
# SPDX-License-Identifier: BSD-3-Clause
# ---------------------------------------------------------------------
"""Shared pytest fixtures for QDC on-device test runners (Linux IoT)."""
import logging
import os
import pytest
from utils import log_environment, write_qdc_log
logging.basicConfig(level=logging.INFO, format="%(name)s %(levelname)s: %(message)s")
@pytest.fixture(scope="session", autouse=True)
def driver():
log_environment()
return None
def pytest_sessionfinish(session, exitstatus):
xml_path = getattr(session.config.option, "xmlpath", None) or "results.xml"
if os.path.exists(xml_path):
with open(xml_path) as f:
write_qdc_log("results.xml", f.read())
|