Skip to content
Snippets Groups Projects
Commit c3371f67 authored by Marek Vavruša's avatar Marek Vavruša
Browse files

tests/integration: address parse, platform checks

parent 09589daf
Branches
Tags
1 merge request!6Zone cut per query
......@@ -92,7 +92,7 @@ class TestServer:
def client(self, dst_address = None):
""" Return connected client. """
self.client_address = dst_address
self.client_address = dst_address.split('@')[0]
sock = socket.socket(self.sock_type, socket.SOCK_STREAM)
sock.connect(self.sock.getsockname())
return sock
......
......@@ -217,10 +217,10 @@ int tcp_recv_msg(int fd, uint8_t *buf, size_t len, struct timeval *timeout)
return rcvd;
}
int udp_recv_msg(int fd, uint8_t *buf, size_t len, struct sockaddr *addr)
int udp_recv_msg(int fd, uint8_t *buf, size_t len, struct timeval *timeout)
{
/* Tunnel via TCP. */
return tcp_recv_msg(fd, buf, len, NULL);
return tcp_recv_msg(fd, buf, len, timeout);
}
......
......@@ -148,11 +148,16 @@ def test_ipc(*args):
finally:
server.stop()
def test_platform(*args):
if sys.platform == 'darwin':
raise Exception('ld -wrap is not supported on OS X')
if __name__ == '__main__':
# Self-tests first
test = test.Test()
test.add('integration/ipc', test_ipc)
test.add('integration/platform', test_platform)
if test.run() != 0:
sys.exit(1)
else:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment