1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

x.websockets: new websockets module on top of x.net (#6189)

This commit is contained in:
Tomas Hellström
2020-08-22 00:50:38 +02:00
committed by GitHub
parent 1b914d217e
commit fb148e0b61
29 changed files with 2302 additions and 1 deletions

View File

@ -0,0 +1,6 @@
FROM crossbario/autobahn-testsuite
COPY check_results.py /check_results.py
RUN chmod +x /check_results.py
COPY config/fuzzingserver.json /config/fuzzingserver.json
COPY config/fuzzingclient.json /config/fuzzingclient.json

View File

@ -0,0 +1,59 @@
import json
nr_of_client_errs = 0
nr_of_client_tests = 0
nr_of_server_errs = 0
nr_of_server_tests = 0
with open("/reports/clients/index.json") as f:
data = json.load(f)
for i in data["v-client"]:
# Count errors
if (
data["v-client"][i]["behavior"] == "FAILED"
or data["v-client"][i]["behaviorClose"] == "FAILED"
):
nr_of_client_errs = nr_of_client_errs + 1
nr_of_client_tests = nr_of_client_tests + 1
with open("/reports/clients/index.json") as f:
data = json.load(f)
for i in data["v-client"]:
# Count errors
if (
data["v-client"][i]["behavior"] == "FAILED"
or data["v-client"][i]["behaviorClose"] == "FAILED"
):
nr_of_client_errs = nr_of_client_errs + 1
nr_of_client_tests = nr_of_client_tests + 1
with open("/reports/servers/index.json") as f:
data = json.load(f)
for i in data["AutobahnServer"]:
if (
data["AutobahnServer"][i]["behavior"] == "FAILED"
or data["AutobahnServer"][i]["behaviorClose"] == "FAILED"
):
nr_of_server_errs = nr_of_server_errs + 1
nr_of_server_tests = nr_of_server_tests + 1
if nr_of_client_errs > 0 or nr_of_server_errs > 0:
print(
"FAILED AUTOBAHN TESTS, CLIENT ERRORS {0}(of {1}), SERVER ERRORS {2}(of {3})".format(
nr_of_client_errs, nr_of_client_tests, nr_of_server_errs, nr_of_server_tests
)
)
exit(1)
print(
"TEST SUCCESS!, CLIENT TESTS({0}), SERVER TESTS ({1})".format(
nr_of_client_tests, nr_of_server_tests
)
)

View File

@ -0,0 +1,22 @@
{
"options": {
"failByDrop": false
},
"outdir": "./reports/servers",
"servers": [
{
"agent": "AutobahnServer",
"url": "ws://autobahn_client:9002"
}
],
"cases": [
"*"
],
"exclude-cases": [
"9.*",
"11.*",
"12.*",
"13.*"
],
"exclude-agent-cases": {}
}

View File

@ -0,0 +1,14 @@
{
"url": "ws://127.0.0.1:9001",
"outdir": "./reports/clients",
"cases": [
"*"
],
"exclude-cases": [
"9.*",
"11.*",
"12.*",
"13.*"
],
"exclude-agent-cases": {}
}