2026-08-25 09:10:17 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
|
|
|
|
|
|
2026-04-20 14:23:42 +08:00
|
|
|
"""
|
|
|
|
|
Root pytest entrypoint for the vLLM-Omni test suite.
|
|
|
|
|
|
2026-08-25 09:10:17 +08:00
|
|
|
- `tests/conftest.py` stays thin: plugin registration only.
|
2026-04-20 14:23:42 +08:00
|
|
|
- Importable utilities live under `tests/helpers/`.
|
2026-07-29 23:53:03 +08:00
|
|
|
- Helper unit tests live under `tests/helpers/tests/`.
|
2026-04-20 14:23:42 +08:00
|
|
|
- Fixtures live under `tests/helpers/fixtures/` and are loaded via `pytest_plugins`.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
2026-05-08 14:12:23 +08:00
|
|
|
# Before ``pytest_plugins`` and before any other test path imports vLLM, pin op
|
|
|
|
|
# registration order (see :func:`tests.model_executor.helpers.bootstrap_vllm_layer_custom_op_modules`).
|
|
|
|
|
# Subdir ``conftest`` hooks can run after other tests are collected/imported, which is
|
|
|
|
|
# too late and can trigger duplicate ``vllm::flashinfer_rotary_embedding`` (etc.) errors.
|
|
|
|
|
from tests.model_executor.helpers import bootstrap_vllm_layer_custom_op_modules
|
|
|
|
|
|
|
|
|
|
bootstrap_vllm_layer_custom_op_modules()
|
|
|
|
|
|
2026-04-20 14:23:42 +08:00
|
|
|
pytest_plugins = (
|
2026-06-23 21:02:29 -06:00
|
|
|
"tests.helpers.fixtures.config",
|
2026-08-25 09:10:17 +08:00
|
|
|
"tests.helpers.fixtures.clean",
|
2026-04-20 14:23:42 +08:00
|
|
|
"tests.helpers.fixtures.log",
|
2026-08-19 19:49:44 -07:00
|
|
|
"tests.helpers.fixtures.media",
|
2026-08-29 18:42:33 +08:00
|
|
|
"tests.helpers.fixtures.pytest_collection",
|
|
|
|
|
"tests.helpers.fixtures.pytest_run_args",
|
2026-04-20 14:23:42 +08:00
|
|
|
"tests.helpers.fixtures.runtime",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def pytest_terminal_summary(terminalreporter, exitstatus, config):
|
|
|
|
|
# Marker for Buildkite log folding before pytest summary lines.
|
|
|
|
|
terminalreporter.write_line("--- Running Summary")
|