python: Output seqno in hpackmake.py, utilize it in hpackcheck.py

This commit is contained in:
Tatsuhiro Tsujikawa 2014-04-23 00:55:54 +09:00
parent 5aa0a0d099
commit efd90c349d
2 changed files with 7 additions and 1 deletions

View File

@ -30,7 +30,12 @@ def testsuite(testdata):
hdrs.sort()
expected_hdrs.sort()
if hdrs != expected_hdrs:
sys.stderr.write('FAIL case#{}\n'.format(casenum + 1))
if 'seqno' in item:
seqno = item['seqno']
else:
seqno = casenum
sys.stderr.write('FAIL seqno#{}\n'.format(seqno))
sys.stderr.write('expected:\n')
for k, v in expected_hdrs:
sys.stderr.write('{}: {}\n'.format(k, v))

View File

@ -28,6 +28,7 @@ result in less bits on the wire.'''
deflater.change_table_size(table_size)
for casenum, item in enumerate(testdata['cases']):
outitem = {
'seqno': casenum,
'headers': item['headers']
}
casenum += 1