Fichiers
rocm-systems/tests/rocdecode/conftest.py
T

26 lignes
562 B
Python
Brut Vue normale Historique

2025-01-17 16:42:25 -06:00
#!/usr/bin/env python3
import json
2025-02-21 15:43:49 -06:00
import os
2025-01-17 16:42:25 -06:00
import pytest
from rocprofiler_sdk.pytest_utils.dotdict import dotdict
def pytest_addoption(parser):
parser.addoption(
"--input",
action="store",
default="rocdecode-tracing-test.json",
help="Input JSON",
)
@pytest.fixture
def input_data(request):
filename = request.config.getoption("--input")
2025-02-21 15:43:49 -06:00
if not os.path.isfile(filename):
return pytest.skip("rocdecode tracing unavailable")
2025-01-17 16:42:25 -06:00
with open(filename, "r") as inp:
return dotdict(json.load(inp))