From de406f11510f8cc6974fd71c7a48ff7ae40d6246 Mon Sep 17 00:00:00 2001 From: Thomas Hintz Date: Wed, 8 Oct 2014 17:20:57 -0700 Subject: [PATCH] Add autobahn test suite echo server. --- test/echo-server.scm | 23 +++++++++++++++++++++++ test/ws-test.spec | 10 ++++++++++ 2 files changed, 33 insertions(+) create mode 100644 test/echo-server.scm create mode 100644 test/ws-test.spec diff --git a/test/echo-server.scm b/test/echo-server.scm new file mode 100644 index 0000000..596fc49 --- /dev/null +++ b/test/echo-server.scm @@ -0,0 +1,23 @@ +(import chicken scheme posix) +(use spiffy websockets) + +(ping-interval 0) +(drop-incoming-pings #f) +(propagate-common-errors #f) + +(handle-not-found + (lambda (path) + (with-websocket + (lambda () + (let loop () + (receive (data type) (receive-message) + (unless (eq? type 'connection-close) + (send-message type data) + (loop)))))))) + +(debug-log (current-output-port)) +(root-path ".") +(server-port 8080) +(start-server) + + diff --git a/test/ws-test.spec b/test/ws-test.spec new file mode 100644 index 0000000..56990c4 --- /dev/null +++ b/test/ws-test.spec @@ -0,0 +1,10 @@ +{ + "servers": [ + {"agent": "AutobahnServer", + "url": "ws://localhost:8080/web-socket", + "options": {"version": 13}} + ], + "cases": ["1.*", "2.*", "3.*", "4.*", "5.*"], + "exclude-cases": [], + "exclude-agent-cases": {} +}