Files
MetaCrate/tools/test_milestone_10.py
Chili Palmer a8b7029413
Some checks failed
Native code generation / deterministic (push) Failing after 8m49s
Native Rust workspace compile / compile (push) Failing after 6m34s
Complete native extension milestone gate (#84)
2026-08-11 04:24:24 +00:00

78 lines
1.7 KiB
Python

#!/usr/bin/env python3
"""Run only tests owned by the rendering, RLV, and LSL milestone."""
from __future__ import annotations
import json
import os
import subprocess
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
ENV = os.environ.copy()
ENV.setdefault("CARGO_BUILD_JOBS", "1")
ENV.setdefault("CARGO_INCREMENTAL", "0")
ENV.setdefault("CARGO_PROFILE_DEV_DEBUG", "0")
ENV.setdefault("CARGO_PROFILE_TEST_DEBUG", "0")
ENV.pop("RUN_LIVE_TESTS", None)
def run(command: list[str]) -> None:
print("+", " ".join(command), flush=True)
subprocess.run(command, cwd=ROOT, env=ENV, check=True)
run(
[
"cargo",
"test",
"-p",
"libremetaverse-rendering-simple",
"-p",
"libremetaverse-rendering-mesh-foundry",
"-p",
"libremetaverse-rlv",
"-p",
"libremetaverse-lsl-tools",
"--locked",
"-j",
"1",
]
)
catalog = json.loads((ROOT / "tests" / "upstream-tests.json").read_text())
rlv_targets = sorted(
{
Path(test["rust_file"]).stem
for test in catalog["tests"]
if test["source"].startswith("LibreMetaverse.Tests/RLV/")
}
)
if len(rlv_targets) != 24:
raise SystemExit(f"milestone 10 expected 24 RLV test targets, found {rlv_targets}")
compat = ["cargo", "test", "-p", "libremetaverse-compat-tests"]
for target in (
"imaging_meshing_semantics",
"rendering_shims",
"extension_shims",
"milestone_10_integration",
*rlv_targets,
):
compat.extend(("--test", target))
compat.extend(("--locked", "-j", "1"))
run(compat)
run(
[
"cargo",
"check",
"--manifest-path",
"tests/api-compile/Cargo.toml",
"--locked",
"-j",
"1",
]
)