Commit cf67d5a3 authored by Alex Hultman's avatar Alex Hultman

Fix Travis testing, run more tests, fix test timeout bug

parent 7756ecf4
osx_image: xcode7.3
os:
- osx
script: make && make install && make tests && time ./testsBin
script: brew install --force openssl libuv && make && make install && make tests && time ./testsBin
CPP_SHARED := -std=c++11 -O3 -I src -shared -fPIC src/Extensions.cpp src/Group.cpp src/Networking.cpp src/Hub.cpp src/Node.cpp src/WebSocket.cpp src/HTTPSocket.cpp src/Socket.cpp src/Epoll.cpp
CPP_OSX := -stdlib=libc++ -mmacosx-version-min=10.7 -undefined dynamic_lookup
CPP_OPENSSL_OSX := -L/usr/local/opt/openssl/lib -I/usr/local/opt/openssl/include
CPP_OSX := -stdlib=libc++ -mmacosx-version-min=10.7 -undefined dynamic_lookup $(CPP_OPENSSL_OSX)
default:
make `(uname -s)`
......@@ -26,4 +27,4 @@ clean:
rm -f libuWS.dylib
.PHONY: tests
tests:
$(CXX) -std=c++11 -O3 tests/main.cpp -Isrc -o testsBin -lpthread -luWS -lssl -lcrypto -lz -luv
$(CXX) $(CPP_OPENSSL_OSX) -std=c++11 -O3 tests/main.cpp -Isrc -o testsBin -lpthread -luWS -lssl -lcrypto -lz -luv
......@@ -1027,11 +1027,6 @@ void testReceivePerformance() {
uWS::Hub h;
h.onError([](void *user) {
std::cout << "FAILURE: " << user << " should not emit error!" << std::endl;
exit(-1);
});
h.onConnection([originalBuffer, buffer, bufferLength, messages, &h](uWS::WebSocket<uWS::SERVER> *ws, uWS::HttpRequest req) {
for (int i = 0; i < 100; i++) {
memcpy(buffer, originalBuffer, bufferLength);
......@@ -1141,6 +1136,8 @@ int main(int argc, char *argv[])
#endif
// These will run on Travis OS X
testReceivePerformance();
testStress();
testHTTP();
testSmallSends();
testSendCallback();
......@@ -1150,14 +1147,12 @@ int main(int argc, char *argv[])
testBroadcast();
testMessageBatch();
testAutoPing();
testConnections();
// These are not working yet / not tested
#ifndef __APPLE__
testReceivePerformance();
testMultithreading();
testReusePort();
testStress();
testConnections();
#endif
//testAutobahn();
......
Markdown is supported
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