From c9e4c809bfd90f226363df1ffa7cb57ce3dfbdee Mon Sep 17 00:00:00 2001 From: zinc Date: Thu, 15 Oct 2026 10:12:55 +0330 Subject: mkgenome: on a header mismatch name FTOP/ZFP, print the image's and the map's values, and point at a stale src/runtime/rt.zc or map --- tests/drivers/tools_contract_test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/drivers/tools_contract_test.py b/tests/drivers/tools_contract_test.py index 6a98678..9323a47 100644 --- a/tests/drivers/tools_contract_test.py +++ b/tests/drivers/tools_contract_test.py @@ -28,9 +28,12 @@ if args.group == 'image': changed = words[:]; changed[index] ^= 2 r = command(['build/bin/mkgenome'], pack(changed)) assert r.returncode != 0 and b'not a genome' in r.stderr and not r.stdout + # the header words are named, with both values, and a layout mismatch points at rt.zc and the map + assert [b'FTOP', b'ZFP', b'third word'][index] in r.stderr, r.stderr + if index < 2: assert b'the map has 0x' in r.stderr and b'src/runtime/rt.zc' in r.stderr and b'make clean' in r.stderr, r.stderr r = command(['build/bin/mkgenome'], b'zc: line 1: something is wrong\nzc: 1 error\n') assert r.returncode != 0 and b'something is wrong' in r.stderr and not r.stdout - print('ok mkgenome roundtrip, truncation, alignment, map-header mutation and diagnostic contracts') + print('ok mkgenome roundtrip, truncation, alignment, map-header mutation (naming FTOP, ZFP and both values) and diagnostic contracts') elif args.group == 'map': for preset in ['default', 'small', 'run', 'lsp', 'fixed']: with tempfile.TemporaryDirectory(prefix='tinyvm preset ') as directory: -- cgit v1.2.3