mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-08 12:24:55 +00:00
ci: Add test for websockets
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jeremy White <jwhite@codeweavers.com>
This commit is contained in:
parent
c1c5d8bf5a
commit
a68fd56b41
@ -136,3 +136,23 @@ makecheck-windows:
|
||||
- mingw64-configure --disable-celt051
|
||||
- mingw64-make
|
||||
- mingw64-make LOG_COMPILE=wine -C server check || (cat server/tests/test-suite.log && exit 1)
|
||||
|
||||
websocket-autobahn:
|
||||
before_script:
|
||||
- apt-get update || true
|
||||
- apt-get install -y python-six python-pyparsing libopus-dev libssl-dev libglib2.0-dev
|
||||
- git clone ${CI_REPOSITORY_URL/spice.git/spice-protocol.git}
|
||||
- (cd spice-protocol && ./autogen.sh --prefix=/usr && make install)
|
||||
image: crossbario/autobahn-testsuite
|
||||
script:
|
||||
- ./autogen.sh
|
||||
- make -j4
|
||||
- ./server/tests/test-websocket & pid=$!
|
||||
- wstest -m fuzzingclient -s server/tests/fuzzingclient.json
|
||||
- kill $pid
|
||||
- server/tests/autobahn-check-report reports/servers/index.json
|
||||
- rm -rf reports/servers
|
||||
- ./server/tests/test-websocket -n & pid=$!
|
||||
- wstest -m fuzzingclient -s server/tests/fuzzingclient.json
|
||||
- kill $pid
|
||||
- server/tests/autobahn-check-report reports/servers/index.json
|
||||
|
||||
18
server/tests/autobahn-check-report
Executable file
18
server/tests/autobahn-check-report
Executable file
@ -0,0 +1,18 @@
|
||||
#!/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')
|
||||
11
server/tests/fuzzingclient.json
Normal file
11
server/tests/fuzzingclient.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"outdir": "./reports/servers",
|
||||
"servers": [
|
||||
{
|
||||
"url": "ws://127.0.0.1:7777"
|
||||
}
|
||||
],
|
||||
"cases": ["*"],
|
||||
"exclude-cases": ["6.*","12.*","13.*"],
|
||||
"exclude-agent-cases": {}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user