Skip to content

Commit 24f3a44

Browse files
committed
Merge pull request #534 from deanberris/0.11-devel-osx-fix-tests
Fix test failures in os x
2 parents e17e8cd + 33b5402 commit 24f3a44

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

libs/network/test/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,8 @@ if (Boost_FOUND)
3939
${CPP-NETLIB_BINARY_DIR}/tests/cpp-netlib-${test})
4040
endforeach (test)
4141

42+
# Also copy the server directory to the root of the build directory.
43+
file(COPY server DESTINATION ${CPP-NETLIB_BINARY_DIR}/libs/network/test/)
44+
4245
endif()
4346

libs/network/test/http/client_get_timeout_test.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,25 @@
55
// http://www.boost.org/LICENSE_1_0.txt)
66

77
#define BOOST_TEST_MODULE HTTP Client Get Timeout Test
8+
#include <cstdlib>
89
#include <boost/network/include/http/client.hpp>
910
#include <boost/test/unit_test.hpp>
1011
#include "client_types.hpp"
1112
#include "http_test_server.hpp"
1213

1314
struct localhost_server_fixture {
1415
localhost_server_fixture() {
15-
if (!server.start())
16+
if (!server.start()) {
1617
std::cout << "Failed to start HTTP server for test!" << std::endl;
18+
std::abort();
19+
}
1720
}
1821

1922
~localhost_server_fixture() {
20-
if (!server.stop())
23+
if (!server.stop()) {
2124
std::cout << "Failed to stop HTTP server for test!" << std::endl;
25+
std::abort();
26+
}
2227
}
2328

2429
http_test_server server;

0 commit comments

Comments
 (0)