From efd90c349de0f4e5aa99d7a564a03e153dc60f6a Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 23 Apr 2014 00:55:54 +0900 Subject: [PATCH] python: Output seqno in hpackmake.py, utilize it in hpackcheck.py --- python/hpackcheck.py | 7 ++++++- python/hpackmake.py | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/python/hpackcheck.py b/python/hpackcheck.py index 09fb71c8..070f382c 100755 --- a/python/hpackcheck.py +++ b/python/hpackcheck.py @@ -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)) diff --git a/python/hpackmake.py b/python/hpackmake.py index c990e4bf..32de2f67 100755 --- a/python/hpackmake.py +++ b/python/hpackmake.py @@ -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