From c2d3857372b7eb60a68f6f247dbcf4cf39908799 Mon Sep 17 00:00:00 2001 From: Roland Edi Date: Sat, 28 Nov 2026 00:05:47 +0000 Subject: [PATCH] tests: ignore the shader cache revision stamp in two exact-set checks The runtime writes /revision.txt with its first request. Two native-path checks still compare the whole cache directory, so a release build that reaches that write reports the metadata file as a published shader. Filter revision.txt from the request-set assertion and from the publication check. The other native checks already do this. --- tests/native_rtv_variant_check.py | 3 ++- tests/startup_compute_dispatch_native_check.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/native_rtv_variant_check.py b/tests/native_rtv_variant_check.py index f1e2c47de0..58980d090a 100644 --- a/tests/native_rtv_variant_check.py +++ b/tests/native_rtv_variant_check.py @@ -288,7 +288,8 @@ def draw(fmt=None): key = G.fnv(line.encode('ascii')) assert (cache / f'req_{key:016x}.rtv').read_bytes() == line.encode('ascii'), line variants.append((key, line, types, target)) - assert sorted(p.name for p in cache.iterdir()) == sorted( + # The first request also writes the stand-in's revision.txt; it is not a request. + assert sorted(p.name for p in cache.iterdir() if p.name != 'revision.txt') == sorted( [f'req_{base:016x}{e}' for e in ('.a', '.b', '.root')] + [f'req_{key:016x}.rtv' for key, *_ in variants]) check_published(cli, sdk, work / 'frontend', cache, base, variants) diff --git a/tests/startup_compute_dispatch_native_check.py b/tests/startup_compute_dispatch_native_check.py index d622bc9858..027565cc40 100644 --- a/tests/startup_compute_dispatch_native_check.py +++ b/tests/startup_compute_dispatch_native_check.py @@ -76,7 +76,9 @@ def main(consumer, dxc_dir, adapter): refused = lines(result, 'refused: ') assert got == untouched, 'a Dispatch with no descriptor at table byte 32 wrote the output' assert len(refused) == 1 and 'no translation' not in refused[0], result.stderr[-3000:] - published = sorted(p.name for p in cache.iterdir() if not p.name.startswith('req_') and p.name != 'native') + # The first request writes revision.txt; it is cache metadata, not a publication. + published = sorted(p.name for p in cache.iterdir() + if not p.name.startswith('req_') and p.name not in ('native', 'revision.txt')) assert not published, f'the native route left {published} in the cache' (directory / 'program').write_bytes(case_a)