diff --git a/tools/check_skips.py b/tools/check_skips.py
index 9f305ef1c1..35d04ffd26 100644
--- a/tools/check_skips.py
+++ b/tools/check_skips.py
@@ -10,20 +10,29 @@ NO_DISPLAY = re.compile(r"skipped,.*no display", re.IGNORECASE)
NO_VULKAN_DEVICE = re.compile(r"skipped,.*no usable Vulkan device", re.IGNORECASE)
HIGH_REFRESH_LIMITATION = re.compile(r"current display does not provide 120 Hz", re.IGNORECASE)
+HIGH_REFRESH_STARTUP_LOGS = (
+ re.compile(r"Surface capabilities drawable=\d+x\d+ min=\d+x\d+ max=\d+x\d+ minImages=\d+ maxImages=\d+ usage=0x[0-9a-f]+", re.IGNORECASE),
+ re.compile(r"\[src/VulkanDevice\.cpp:\d+ VulkanDevice\] Swapchain created swapchain=0x[0-9a-f]+ extent=\d+x\d+ images=\d+", re.IGNORECASE),
+ re.compile(r"\[shader-disk-cache\] .+ \(source version [0-9a-f]+, format \d+\)", re.IGNORECASE),
+)
SKIP_RETURN_CODE = re.compile(r"SKIP_RETURN_CODE=\d+")
WINDOWS_PREFIX = "agc"
def high_refresh_limitation(output):
- reasons = []
+ found_limitation = False
for line in output.splitlines():
- reason = line.strip()
- if reason.lower().startswith("skipped,"):
- reason = reason[len("skipped,"):].strip()
- if reason:
- reasons.append(reason)
- return bool(reasons) and all(HIGH_REFRESH_LIMITATION.fullmatch(reason) for reason in reasons)
+ message = line.strip()
+ if not message:
+ continue
+ if message.lower().startswith("skipped,"):
+ message = message[len("skipped,"):].strip()
+ if HIGH_REFRESH_LIMITATION.fullmatch(message):
+ found_limitation = True
+ elif not any(pattern.fullmatch(message) for pattern in HIGH_REFRESH_STARTUP_LOGS):
+ return False
+ return found_limitation
def skips(path):
diff --git a/tools/tests/test_check_skips.py b/tools/tests/test_check_skips.py
index e364666c81..dfff4890fd 100644
--- a/tools/tests/test_check_skips.py
+++ b/tools/tests/test_check_skips.py
@@ -57,6 +57,23 @@ class CheckSkipsTests(unittest.TestCase):
self.assertEqual(result.returncode, 0, result.stdout + result.stderr)
self.assertIn("1 test(s) skipped, all expected", result.stdout)
+ def test_high_refresh_skip_allows_known_vulkan_startup_logs(self):
+ report = '''Surface capabilities drawable=1152x648 min=1152x648 max=1152x648 minImages=3 maxImages=0 usage=0x8009f
+[src/VulkanDevice.cpp:1972 VulkanDevice] Swapchain created swapchain=0x12345678 extent=1152x648 images=3
+[shader-disk-cache] /tmp/build/tests/shader_cache/4bc6b6d4632b7637 (source version 4bc6b6d4632b7637, format 36)
+skipped, current display does not provide 120 Hz
+'''
+ with tempfile.TemporaryDirectory() as directory:
+ junit = Path(directory) / "junit.xml"
+ junit.write_text(f'{report}', encoding="utf-8")
+ for job in ("linux", "windows"):
+ with self.subTest(job=job):
+ result = subprocess.run(
+ [sys.executable, "-I", str(TOOL), str(junit), "--job", job],
+ capture_output=True, text=True)
+ self.assertEqual(result.returncode, 0, result.stdout + result.stderr)
+ self.assertIn("1 test(s) skipped, all expected", result.stdout)
+
def test_high_refresh_reason_cannot_hide_additional_diagnostics(self):
reason = "current display does not provide 120 Hz"
known = f"skipped, {reason}"