[Test] Consolidate test cleanup and CI taxonomy (net -11.4K lines) (#37436)
Co-authored-by: Mick Qian <mickqian@users.noreply.github.com>
This commit is contained in:
co-authored by
Mick Qian
parent
6a1ff90f2d
commit
4d23a4fa6d
@@ -98,19 +98,6 @@ def register_amd_ci(
|
||||
return None
|
||||
|
||||
|
||||
def register_musa_ci(
|
||||
est_time: float,
|
||||
suite: Optional[str] = None,
|
||||
nightly: bool = False,
|
||||
disabled: Optional[str] = None,
|
||||
*,
|
||||
stage: Optional[str] = None,
|
||||
runner_config: Optional[str] = None,
|
||||
):
|
||||
"""Marker for MUSA CI registration (parsed via AST; runtime no-op)."""
|
||||
return None
|
||||
|
||||
|
||||
def register_npu_ci(
|
||||
est_time: float,
|
||||
suite: Optional[str] = None,
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
"""Bridge registered diffusion suites to their case-aware pytest adapter."""
|
||||
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def _enabled(name: str) -> bool:
|
||||
return os.environ.get(name, "").lower() in {"1", "true", "yes", "on"}
|
||||
|
||||
|
||||
def run_diffusion_suite(suite: str) -> None:
|
||||
"""Run one legacy-named diffusion suite without exposing a second CI CLI."""
|
||||
|
||||
from sglang.multimodal_gen.test.runner.diffusion_suite_runner import main
|
||||
|
||||
args = [sys.argv[0], "--suite", suite]
|
||||
optional_values = (
|
||||
("DIFFUSION_PARTITION_ID", "--partition-id"),
|
||||
("DIFFUSION_TOTAL_PARTITIONS", "--total-partitions"),
|
||||
("DIFFUSION_PARTITION_PLAN_JSON", "--partition-plan-json"),
|
||||
("DIFFUSION_PYTEST_FILTER", "--filter"),
|
||||
)
|
||||
for environment_name, option in optional_values:
|
||||
value = os.environ.get(environment_name)
|
||||
if value:
|
||||
args.extend([option, value])
|
||||
if _enabled("DIFFUSION_CONTINUE_ON_ERROR"):
|
||||
args.append("--continue-on-error")
|
||||
|
||||
# Preserve the historical cwd: several diffusion fixtures emit artifacts
|
||||
# relative to ``python/`` rather than to their source file.
|
||||
os.chdir(Path(__file__).resolve().parents[4] / "python")
|
||||
sys.argv = args
|
||||
main()
|
||||
Reference in New Issue
Block a user