forked from boostorg/beast
		
	* Run autobahn/valgrind tests when target branch in {master, develop}
* Add coveralls
* Show full stacktrace for usan (RIPD-1150)
* Manual launch of coverage (RIPD-1152)
* Use lldb on Darwin (RIPD-1152)
* Set defaults if not CI (RIPD-1152)
* Add autobahn result parser (RIPD-1147)
		
	
		
			
				
	
	
		
			44 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			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)
 |