CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
77 lines
1.9 KiB
Python
77 lines
1.9 KiB
Python
"""Shared fixtures for integration tests.
|
|
|
|
Discovers fixture .db files under tests/fixtures/. If a fixture is
|
|
missing, the dependent test is skipped rather than fails — this keeps
|
|
CI green when fixtures haven't been regenerated locally.
|
|
"""
|
|
|
|
from pathlib import Path
|
|
from unittest.mock import MagicMock
|
|
|
|
import pytest
|
|
|
|
|
|
FIXTURE_DIR = Path(__file__).parent.parent / "fixtures"
|
|
|
|
|
|
def _find_fixture(name: str) -> Path:
|
|
"""Return path to the named fixture, or None if absent."""
|
|
p = FIXTURE_DIR / name
|
|
return p if p.exists() else None
|
|
|
|
|
|
@pytest.fixture
|
|
def compute_bound_db():
|
|
p = _find_fixture("compute_bound.db")
|
|
if p is None:
|
|
pytest.skip("compute_bound.db fixture not present")
|
|
return p
|
|
|
|
|
|
@pytest.fixture
|
|
def trace_only_elementwise_db():
|
|
"""Trace-only DB (no --pmc counters) — expected to yield data_insufficient verdict."""
|
|
p = _find_fixture("trace_only_elementwise.db")
|
|
if p is None:
|
|
pytest.skip("trace_only_elementwise.db fixture not present")
|
|
return p
|
|
|
|
|
|
@pytest.fixture
|
|
def memory_bound_db():
|
|
p = _find_fixture("memory_bound.db")
|
|
if p is None:
|
|
pytest.skip("memory_bound.db fixture not present")
|
|
return p
|
|
|
|
|
|
@pytest.fixture
|
|
def latency_bound_db():
|
|
p = _find_fixture("latency_bound.db")
|
|
if p is None:
|
|
pytest.skip("latency_bound.db fixture not present")
|
|
return p
|
|
|
|
|
|
@pytest.fixture
|
|
def test_gfx_id():
|
|
return "gfx942"
|
|
|
|
|
|
@pytest.fixture
|
|
def regression_db_pair():
|
|
"""Tuple (baseline, candidate) — candidate is intentionally slower."""
|
|
b = _find_fixture("baseline.db")
|
|
c = _find_fixture("regressed.db")
|
|
if b is None or c is None:
|
|
pytest.skip("regression fixture pair not present")
|
|
return (b, c)
|
|
|
|
|
|
@pytest.fixture
|
|
def fake_provider(monkeypatch):
|
|
"""Mock LLM provider for parity tests."""
|
|
mock = MagicMock()
|
|
monkeypatch.setenv("PERFXPERT_PROVIDER", "anthropic")
|
|
return mock
|