linux fix + unittest works with Linux
This commit is contained in:
parent
06177afd6a
commit
973a3f03c3
@ -15,6 +15,5 @@ RUN apt-get -y install cmake
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
#WORKDIR examples/ws_connect
|
WORKDIR test
|
||||||
#RUN ["sh", "build_linux.sh"]
|
RUN ["sh", "build_linux.sh"]
|
||||||
RUN ["make", "test"]
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
namespace ix
|
namespace ix
|
||||||
{
|
{
|
||||||
|
2
makefile
2
makefile
@ -21,6 +21,6 @@ build:
|
|||||||
test_server:
|
test_server:
|
||||||
(cd test && npm i ws && node broadcast-server.js)
|
(cd test && npm i ws && node broadcast-server.js)
|
||||||
test:
|
test:
|
||||||
(cd test && cmake . && make && ./ixwebsocket_unittest)
|
(cd test && sh run.sh)
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
|
30
test/build_linux.sh
Normal file
30
test/build_linux.sh
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Author: Benjamin Sergeant
|
||||||
|
# Copyright (c) 2017-2018 Machine Zone, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
|
||||||
|
# 'manual' way of building. You can also use cmake.
|
||||||
|
|
||||||
|
g++ --std=c++11 \
|
||||||
|
-DIXWEBSOCKET_USE_TLS \
|
||||||
|
-g \
|
||||||
|
../ixwebsocket/IXEventFd.cpp \
|
||||||
|
../ixwebsocket/IXSocket.cpp \
|
||||||
|
../ixwebsocket/IXSetThreadName.cpp \
|
||||||
|
../ixwebsocket/IXWebSocketTransport.cpp \
|
||||||
|
../ixwebsocket/IXWebSocket.cpp \
|
||||||
|
../ixwebsocket/IXWebSocketServer.cpp \
|
||||||
|
../ixwebsocket/IXDNSLookup.cpp \
|
||||||
|
../ixwebsocket/IXSocketConnect.cpp \
|
||||||
|
../ixwebsocket/IXSocketOpenSSL.cpp \
|
||||||
|
../ixwebsocket/IXWebSocketPerMessageDeflate.cpp \
|
||||||
|
../ixwebsocket/IXWebSocketPerMessageDeflateOptions.cpp \
|
||||||
|
-I ../.. \
|
||||||
|
-I Catch2/single_include \
|
||||||
|
test_runner.cpp \
|
||||||
|
cmd_websocket_chat.cpp \
|
||||||
|
IXTest.cpp \
|
||||||
|
msgpack11.cpp \
|
||||||
|
-o ixwebsocket_unittest \
|
||||||
|
-lcrypto -lssl -lz -lpthread
|
Loading…
Reference in New Issue
Block a user