aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFraser Adams <fraser.adams@blueyonder.co.uk>2014-01-31 10:49:27 +0000
committerFraser Adams <fraser.adams@blueyonder.co.uk>2014-01-31 10:49:27 +0000
commit3638861ee00cd66ab2d621fc061ae46c9b5e2e3d (patch)
treef7c384dee4681193b893236440ecc3b94676c72d
parent9ed679c54f623f8b3ee41bcda1b540adc94a2693 (diff)
Add the datagram switch to the client as well as the server
-rw-r--r--tests/test_sockets.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_sockets.py b/tests/test_sockets.py
index 030a26a3..9eb22e9c 100644
--- a/tests/test_sockets.py
+++ b/tests/test_sockets.py
@@ -414,15 +414,15 @@ class sockets(BrowserCore):
sockets_include = '-I'+path_from_root('tests', 'sockets')
harnesses = [
- (WebsockifyServerHarness(os.path.join('sockets', 'test_sockets_echo_server.c'), [sockets_include], 49160)),
- (CompiledServerHarness(os.path.join('sockets', 'test_sockets_echo_server.c'), [sockets_include, '-DTEST_DGRAM=0'], 49161)),
- (CompiledServerHarness(os.path.join('sockets', 'test_sockets_echo_server.c'), [sockets_include, '-DTEST_DGRAM=1'], 49161))
+ (WebsockifyServerHarness(os.path.join('sockets', 'test_sockets_echo_server.c'), [sockets_include], 49160), 0),
+ (CompiledServerHarness(os.path.join('sockets', 'test_sockets_echo_server.c'), [sockets_include, '-DTEST_DGRAM=0'], 49161), 0),
+ (CompiledServerHarness(os.path.join('sockets', 'test_sockets_echo_server.c'), [sockets_include, '-DTEST_DGRAM=1'], 49162), 1)
]
# Basic test of node client against both a Websockified and compiled echo server.
- for harness in harnesses:
+ for harness, datagram in harnesses:
with harness:
- Popen([PYTHON, EMCC, path_from_root('tests', 'sockets', 'test_sockets_echo_client.c'), '-o', path_from_root('tests', 'sockets', 'client.js'), '-DSOCKK=%d' % harness.listen_port, '-DREPORT_RESULT=int dummy'], stdout=PIPE, stderr=PIPE).communicate()
+ Popen([PYTHON, EMCC, path_from_root('tests', 'sockets', 'test_sockets_echo_client.c'), '-o', path_from_root('tests', 'sockets', 'client.js'), '-DSOCKK=%d' % harness.listen_port, '-DTEST_DGRAM=%d' % datagram, '-DREPORT_RESULT=int dummy'], stdout=PIPE, stderr=PIPE).communicate()
out = run_js(path_from_root('tests', 'sockets', 'client.js'), engine=NODE_JS, full_output=True)
self.assertContained('do_msg_read: read 14 bytes', out)