qdc-test-script / conftest.py
zackliqcom's picture
Upload folder using huggingface_hub
f2f6076 verified
raw
history blame contribute delete
857 Bytes
# ---------------------------------------------------------------------
# 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())