| # --------------------------------------------------------------------- | |
| # 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") | |
| 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()) | |