Files
xahaud/scripts/parseautobahn.py
Vinnie Falco d8dea963fa Squashed 'src/beast/' changes from 1b9a714..6d5547a
6d5547a Set version to 1.0.0-b34
6fab138 Fix and tidy up CMake build scripts:
ccefa54 Set version to 1.0.0-b33
32afe41 Set internal state correctly when writing frames:
fe3e20b Add write_frames unit test
578dcd0 Add decorator unit test
aaa3733 Use fwrite return value in file_body
df66165 Require Visual Studio 2015 Update 3 or later
b8e5a21 Set version to 1.0.0-b32
ffb1758 Update CMake scripts for finding packages:
b893749 Remove http Writer suspend and resume feature (API Change):
27864fb Add io_service completion invariants tests
eba05a7 Set version to 1.0.0-b31
484bcef Fix badge markdown in README.md
5663bea Add missing dynabuf_readstream member
0d7a551 Tidy up build settings
0fd4030 Move the handler, don't copy it

git-subtree-dir: src/beast
git-subtree-split: 6d5547a32c50ec95832c4779311502555ab0ee1f
2017-04-20 13:40:52 -07:00

44 lines
1.4 KiB
Python

import os
import json
import sys
VARIANT = os.environ.get('VARIANT', 'release')
EXPECTED_BEHAVIOR = ('OK', 'UNIMPLEMENTED', 'INFORMATIONAL')
EXPECTED_BEHAVIOR_CLOSE = ('OK', 'INFORMATIONAL')
WARNINGS = ("peer did not respond (in time) in closing handshake", )
args = sys.argv[1:]
fn = os.path.abspath(args[0])
indexPath = os.path.dirname(fn)
relativeToIndex = lambda f: os.path.join(indexPath, f)
print "index", fn
failures = []
warnings = []
with open(fn, 'r') as fh:
index = json.load(fh)
for servername, serverResults in index.items():
for test in serverResults:
result = serverResults[test]
if ((result['behavior'] not in EXPECTED_BEHAVIOR) or
result['behaviorClose'] not in EXPECTED_BEHAVIOR_CLOSE):
with open(relativeToIndex(result['reportfile'])) as rh:
report = json.load(rh)
if (report.get('wasNotCleanReason', '') in WARNINGS and
VARIANT != 'release'):
warnings.append(report)
else:
failures.append(report)
if warnings:
print >> sys.stderr, json.dumps(warnings, indent=2)
print >> sys.stderr, 'there was %s warnings' % len(warnings)
if failures:
print >> sys.stderr, json.dumps(failures, indent=2)
print >> sys.stderr, 'there was %s failures' % len(failures)
sys.exit(1)