Unverified Commit 5bd30719 authored by Keiven C's avatar Keiven C Committed by GitHub
Browse files

fix: minor fixes (test parser, verbose flags, and adding comments to clarify gpu_1 usage) (#7841)


Signed-off-by: default avatarKeiven Chang <keivenchang@users.noreply.github.com>
parent 6e202956
......@@ -37,6 +37,8 @@ JINJA_TEMPLATE_PATH = str(
pytestmark = [
pytest.mark.unit,
pytest.mark.vllm,
# gpu_1 not gpu_0: vLLM DeviceConfig(device='auto') fails on CPU-only arm64
# runners with "Failed to infer device type" even for mock tests.
pytest.mark.gpu_1,
pytest.mark.pre_merge,
]
......
......@@ -14,6 +14,8 @@ from dynamo.vllm.worker_factory import EngineSetupResult, WorkerFactory
pytestmark = [
pytest.mark.unit,
pytest.mark.vllm,
# gpu_1 not gpu_0: vLLM DeviceConfig(device='auto') fails on CPU-only arm64
# runners with "Failed to infer device type" even for mock tests.
pytest.mark.gpu_1,
pytest.mark.pre_merge,
]
......
......@@ -43,7 +43,8 @@ SEARCH_TOOL = {
pytestmark = [
pytest.mark.vllm,
# vllm frontend doesn't need or use the GPU, but in CI pytorch seems to look for the Device
# gpu_1 not gpu_0: vLLM DeviceConfig(device='auto') fails on CPU-only arm64
# runners with "Failed to infer device type" even for mock tests.
pytest.mark.gpu_1,
pytest.mark.pre_merge,
pytest.mark.integration,
......
......@@ -194,8 +194,17 @@ def _aggregate_junit_xml(junit_dir: str) -> str | None:
def _collect_tests(pytest_args: list[str], max_vram_gib: float) -> list[str]:
"""Run pytest --collect-only to get test IDs, filtered by --max-vram-gib."""
_strip_flags = {"-v", "-vv", "-vvv", "--verbose", "-s", "--capture=no"}
collect_args = [a for a in pytest_args if a not in _strip_flags]
_strip_exact = {"-v", "-vv", "-vvv", "--verbose", "-s", "--capture=no"}
collect_args = []
for a in pytest_args:
if a in _strip_exact:
continue
if a.startswith("-") and not a.startswith("--") and "v" in a:
stripped = a.replace("v", "")
if stripped != "-":
collect_args.append(stripped)
continue
collect_args.append(a)
cmd = [
sys.executable,
"-m",
......@@ -209,7 +218,7 @@ def _collect_tests(pytest_args: list[str], max_vram_gib: float) -> list[str]:
test_ids = []
for line in result.stdout.strip().split("\n"):
line = line.strip()
if "::" in line and not line.startswith(" "):
if ".py::" in line and not line.startswith(" "):
test_ids.append(line)
return test_ids
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment