29 lines
2.1 KiB
Python
29 lines
2.1 KiB
Python
from pathlib import Path
|
|
import json,hashlib,shutil
|
|
root=Path(__file__).resolve().parents[2]
|
|
evidence=root/'code/tests/evidence/undo-redo-2026-11-24'
|
|
package=root/'code/packages/0.1.4-alpha'
|
|
sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
|
|
manifest=json.loads((package/'package-manifest.json').read_text(encoding='utf-8-sig'))
|
|
for item in manifest['sourceFiles']:item['sha256']=sha(root/item['path'])
|
|
manifest['deployedFiles']=[dict(path=str(p.relative_to(package)),sha256=sha(p)) for p in sorted(package.rglob('*')) if p.is_file() and p.name!='package-manifest.json']
|
|
manifest['executableSha256']=sha(package/'TikZRefinery.exe')
|
|
manifest['nativeReview']='Move, Ctrl+Z/Ctrl+Y, menu availability, About; corrected repaint verified after Undo without reselecting'
|
|
manifest['limitations']='No allocation-failure injection, memory benchmark or clean-machine claim; slide deck remains 0.1.3-alpha'
|
|
(package/'package-manifest.json').write_text(json.dumps(manifest,indent=2),encoding='utf-8')
|
|
shutil.copy2(package/'package-manifest.json',evidence/'package-manifest.json')
|
|
protected=json.loads((evidence/'protected-before.json').read_text(encoding='utf-8-sig'))
|
|
assert all((root/p).is_file() and sha(root/p)==h for p,h in protected.items()),'Protected file changed'
|
|
missing=[]
|
|
for name in (evidence/'deployment-files.txt').read_text(encoding='utf-8-sig').splitlines():
|
|
p=root/name if name.startswith('code') else package/name
|
|
if not p.is_file():missing.append(name)
|
|
assert not missing,missing
|
|
for name in ['debug-tests.txt','release-tests.txt']:
|
|
assert '100% tests passed, 0 tests failed out of 8' in (evidence/name).read_text(encoding='utf-8-sig')
|
|
(evidence/'package-checks.json').write_text(json.dumps(dict(protectedFilesUnchanged=len(protected),deploymentFilesPresent=True,
|
|
debugSuitesPassed=8,releaseSuitesPassed=8,exeSha256=sha(package/'TikZRefinery.exe'),
|
|
nativeRepaint='Verified after Undo without selection change; see native-repaint-fixed.jpg',
|
|
scope='Windows x64 Qt 6.12.0 MinGW Release; no clean-machine or product acceptance claim'),indent=2),encoding='utf-8')
|
|
print('Verified protected files, deployment list and eight suites in each configuration.')
|