Merge pull request #292 from sigiesec/build-zeromq-4-3-1

Update default libzmq version to 4.3.1
This commit is contained in:
Luca Boccassi 2019-02-04 17:08:20 +00:00 committed by GitHub
commit bfdc7885b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 13 deletions

View File

@ -42,6 +42,10 @@ matrix:
- os: linux
env: ZMQ_VERSION=4.2.0 BUILD_TYPE=pkgconfig
# GCC default, draft disabled, latest 4.2.x libzmq (defined in ci_build.sh)
- os: linux
env: ZMQ_VERSION=4.2.5
# GCC default, draft disabled, default libzmq (defined in ci_build.sh)
- os: linux

View File

@ -23,9 +23,10 @@ Supported platforms
===================
- Only a subset of the platforms that are supported by libzmq itself are supported. Some features already require a compiler supporting C++11. In the future, probably all features will require C++11. To build and run the tests, CMake and Catch are required.
- Tested libzmq versions are
- Any libzmq 4.x version is expected to work. DRAFT features may only work for the most recent tested version. Currently explicitly tested libzmq versions are
- 4.2.0 (without DRAFT API)
- 4.2.5 (with and without DRAFT API)
- 4.2.5 (without DRAFT API)
- 4.3.1 (with and without DRAFT API)
- Platforms with full support (i.e. CI executing build and tests)
- Ubuntu 14.04 x64 (with gcc 4.8.4) (without DRAFT API only)
- Ubuntu 14.04 x64 (with gcc 7.3.0)

View File

@ -4,7 +4,7 @@ set -x
set -e
BUILD_TYPE=${BUILD_TYPE:-cmake}
ZMQ_VERSION=${ZMQ_VERSION:-4.2.5}
ZMQ_VERSION=${ZMQ_VERSION:-4.3.1}
ENABLE_DRAFTS=${ENABLE_DRAFTS:-OFF}
COVERAGE=${COVERAGE:-OFF}
LIBZMQ=${PWD}/libzmq-build

View File

@ -83,20 +83,20 @@ TEST_CASE("add handler", "[active_poller]")
CHECK_NOTHROW(active_poller.add(socket, ZMQ_POLLIN, handler));
}
#if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 3, 0)
// this behaviour was added by https://github.com/zeromq/libzmq/pull/3100
TEST_CASE("add handler invalid events type", "[active_poller]")
{
/// \todo is it good that this is accepted? should probably already be
/// checked by zmq_poller_add/modify in libzmq:
/// https://github.com/zeromq/libzmq/issues/3088
zmq::context_t context;
zmq::socket_t socket{context, zmq::socket_type::router};
zmq::active_poller_t active_poller;
zmq::active_poller_t::handler_t handler;
short invalid_events_type = 2 << 10;
CHECK_NOTHROW(active_poller.add(socket, invalid_events_type, handler));
CHECK_FALSE(active_poller.empty());
CHECK(1u == active_poller.size());
CHECK_THROWS_AS(active_poller.add(socket, invalid_events_type, handler), zmq::error_t);
CHECK(active_poller.empty());
CHECK(0u == active_poller.size());
}
#endif
TEST_CASE("add handler twice throws", "[active_poller]")
{

View File

@ -66,17 +66,17 @@ TEST_CASE("poller add non nullptr", "[poller]")
CHECK_NOTHROW(poller.add(socket, ZMQ_POLLIN, &i));
}
#if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 3, 0)
// this behaviour was added by https://github.com/zeromq/libzmq/pull/3100
TEST_CASE("poller add handler invalid events type", "[poller]")
{
/// \todo is it good that this is accepted? should probably already be
/// checked by zmq_poller_add/modify in libzmq:
/// https://github.com/zeromq/libzmq/issues/3088
zmq::context_t context;
zmq::socket_t socket{context, zmq::socket_type::router};
zmq::poller_t<> poller;
short invalid_events_type = 2 << 10;
CHECK_NOTHROW(poller.add(socket, invalid_events_type, nullptr));
CHECK_THROWS_AS(poller.add(socket, invalid_events_type, nullptr), zmq::error_t);
}
#endif
TEST_CASE("poller add handler twice throws", "[poller]")
{