spice/server/tests/autobahn-check-report
Frediano Ziglio a68fd56b41 ci: Add test for websockets
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jeremy White <jwhite@codeweavers.com>
2019-06-26 14:19:43 +01:00

19 lines
516 B
Python
Executable File

#!/usr/bin/env python
import sys
import json
num_tests = 0
for server in json.load(open(sys.argv[1])).values():
for test, result in server.items():
is_test = 0
for k, v in result.items():
if k[:8].lower() != 'behavior':
continue
is_test = 1
if v != 'OK' and v != 'INFORMATIONAL':
raise Exception('Invalid %s %s for test %s' % (k, v, test))
num_tests += is_test
if num_tests < 100:
raise Exception('Too few tests done %s' % num_tests)
print('Output report is fine')