Update scripts/vlac2_release_common.py
Browse files
scripts/vlac2_release_common.py
CHANGED
|
@@ -23,6 +23,8 @@ LEGACY_PORTABLE_IMAGE_ROOTS = (
|
|
| 23 |
GENERATED_MARKER_FILENAME = "_GENERATED"
|
| 24 |
PUBLIC_BENCHMARK_JSON_NAME = "video_progress_benchmark_file.json"
|
| 25 |
PUBLIC_RELEASE_ROOT_PLACEHOLDER = "__VLAC2_RELEASE_ROOT__"
|
|
|
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
def portable_image_roots() -> tuple[Path, ...]:
|
|
@@ -62,7 +64,7 @@ def ensure_release_tree(release_root: Path) -> dict[str, Path]:
|
|
| 62 |
paths = {
|
| 63 |
"release_root": release_root,
|
| 64 |
"raw_root": release_root / "vlac2_release_data",
|
| 65 |
-
"benchmark_root": release_root /
|
| 66 |
"portable_image_root": release_root / PORTABLE_IMAGE_ROOT,
|
| 67 |
"scripts_root": release_root / "scripts",
|
| 68 |
}
|
|
@@ -248,3 +250,14 @@ def discover_benchmark_jsons(benchmark_root: Path) -> list[Path]:
|
|
| 248 |
seen.add(resolved)
|
| 249 |
candidates.append(resolved)
|
| 250 |
return candidates
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
GENERATED_MARKER_FILENAME = "_GENERATED"
|
| 24 |
PUBLIC_BENCHMARK_JSON_NAME = "video_progress_benchmark_file.json"
|
| 25 |
PUBLIC_RELEASE_ROOT_PLACEHOLDER = "__VLAC2_RELEASE_ROOT__"
|
| 26 |
+
PUBLIC_BENCHMARK_DIRNAME = "benchmark_data"
|
| 27 |
+
LEGACY_BENCHMARK_DIRNAME = "benchmark_json"
|
| 28 |
|
| 29 |
|
| 30 |
def portable_image_roots() -> tuple[Path, ...]:
|
|
|
|
| 64 |
paths = {
|
| 65 |
"release_root": release_root,
|
| 66 |
"raw_root": release_root / "vlac2_release_data",
|
| 67 |
+
"benchmark_root": release_root / PUBLIC_BENCHMARK_DIRNAME,
|
| 68 |
"portable_image_root": release_root / PORTABLE_IMAGE_ROOT,
|
| 69 |
"scripts_root": release_root / "scripts",
|
| 70 |
}
|
|
|
|
| 250 |
seen.add(resolved)
|
| 251 |
candidates.append(resolved)
|
| 252 |
return candidates
|
| 253 |
+
|
| 254 |
+
|
| 255 |
+
def resolve_benchmark_root(release_root: Path) -> Path:
|
| 256 |
+
release_root = release_root.resolve()
|
| 257 |
+
preferred = release_root / PUBLIC_BENCHMARK_DIRNAME
|
| 258 |
+
legacy = release_root / LEGACY_BENCHMARK_DIRNAME
|
| 259 |
+
if preferred.exists():
|
| 260 |
+
return preferred
|
| 261 |
+
if legacy.exists():
|
| 262 |
+
return legacy
|
| 263 |
+
return preferred
|