mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 06:08:30 +09:00
[CI] isolate retrace summary images by device
This commit is contained in:
@@ -138,8 +138,12 @@ function inferCaseBackend(filePath) {
|
|||||||
|
|
||||||
function inferGroup(filePath, defaultGroup) {
|
function inferGroup(filePath, defaultGroup) {
|
||||||
const text = normalizeSlashes(filePath);
|
const text = normalizeSlashes(filePath);
|
||||||
for (const token of ["HA27Q3LQ", "JNHUVK4XL7ZLWK7L"]) {
|
for (const segment of text.split("/")) {
|
||||||
if (text.includes(token)) return token;
|
const match = segment.match(/^android-retrace-(?:result|fixture|work)-(.+)$/);
|
||||||
|
if (!match) continue;
|
||||||
|
const parts = match[1].split("-");
|
||||||
|
const serial = parts[parts.length - 1];
|
||||||
|
if (serial) return serial;
|
||||||
}
|
}
|
||||||
return defaultGroup;
|
return defaultGroup;
|
||||||
}
|
}
|
||||||
@@ -229,7 +233,12 @@ async function findImage(pngs, caseName, backend, kind, nearFile) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const scored = [];
|
const scored = [];
|
||||||
|
const nearGroup = nearFile ? inferGroup(nearFile, "") : "";
|
||||||
for (const png of pngs) {
|
for (const png of pngs) {
|
||||||
|
const text = normalizeSlashes(png);
|
||||||
|
if ((kind === "actual" || kind === "diff") && backend && !text.includes(backend)) continue;
|
||||||
|
const pngGroup = inferGroup(png, "");
|
||||||
|
if (nearGroup && pngGroup && pngGroup !== nearGroup) continue;
|
||||||
const score = scoreImage(png, caseName, backend, kind);
|
const score = scoreImage(png, caseName, backend, kind);
|
||||||
if (score >= 7) scored.push({ score, png });
|
if (score >= 7) scored.push({ score, png });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user