Skip to content

Commit

Permalink
Updated travis CI tests with version 4.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
scemama committed Nov 9, 2015
1 parent ebff44f commit 003176e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 40 deletions.
29 changes: 1 addition & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

A Fortran 77 binding library for [ZeroMQ](http://zeromq.org)

Note: For the moment, this binding is broken with the latest version of ZeroMQ (4.1). It works with version 4.0.7. Don't worry, it is just a little thing to fix so it will come soon.
This binding works with [ZeroMQ 4.1.3](https://github.com/zeromq/zeromq4-1).

## Usage

Expand Down Expand Up @@ -97,32 +97,5 @@ of a few functions.
+ `integer(ZMQ_PTR) item` : poll item struct


### Additional Event-related functions

* `integer(ZMQ_PTR) f77_zmq_event_new()` : Allocates a `zmq_event_t` and returns the pointer

* `integer f77_zmq_event_destroy(event)` : Deallocates the `zmq_event_t`. Return value is `0`.

+ `integer(ZMQ_PTR) event` : event struct

* `int f77_zmq_event_event(event)` : Returns the event field of the `zmq_event_t`.

+ `integer(ZMQ_PTR) event` : `zmq_event_t` struct

* `int f77_zmq_event_set_event(event, bitfield) : Sets the event field of the `zmq_event_t`.
Returns `0`.

+ `integer(ZMQ_PTR) event` : `zmq_event_t` struct
+ `integer bitfield` : id of the event as bitfield

* `int f77_zmq_event_value(event)` : Returns the value field of the `zmq_event_t`.

+ `integer(ZMQ_PTR) event` : `zmq_event_t` struct

* `int f77_zmq_event_set_value(event, value) : Sets the value field of the `zmq_event_t`.
Returns `0`.

+ `integer(ZMQ_PTR) event` : `zmq_event_t` struct
+ `integer value` : value is either error code, fd or reconnect interval


15 changes: 8 additions & 7 deletions travis_ci/install_zmq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# Tests the build distribution


ZMQ_TGZ="zeromq-4.0.6.tar.gz"
VERSION=4.1.3
ZMQ_TGZ="zeromq-${VERSION}.tar.gz"

export C_INCLUDE_PATH=${C_INCLUDE_PATH}:./

Expand All @@ -12,7 +13,7 @@ export C_INCLUDE_PATH=${C_INCLUDE_PATH}:./

if [[ ! -f ${ZMQ_TGZ} ]]
then
wget "http://download.zeromq.org/"${ZMQ_TGZ}
wget "http://download.zeromq.org/zeromq-${VERSION}.tar.gz"
if [[ $? -ne 0 ]]
then
echo "Unable to download ${ZMQ_TGZ}"
Expand All @@ -27,14 +28,14 @@ mkdir lib

tar -zxf ${ZMQ_TGZ}
pushd ${ZMQ_TGZ%.tar.gz}
./configure || exit 1
make || exit 1
#cp src/.libs/libzmq.a ../lib
cp src/.libs/libzmq.so ../lib/libzmq.so.4
./configure --without-libsodium || exit 1
make -j 8 || exit 1
cp src/.libs/libzmq.a ../lib
cp src/.libs/libzmq.so ../lib/libzmq.so.5
cp include/{zmq.h,zmq_utils.h} ../lib
popd
pushd lib
ln -s libzmq.so.4 libzmq.so
ln -s libzmq.so.5 libzmq.so
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD
export LIBRARY_PATH=$LIBRARY_PATH:$PWD
export ZMQ_H=$PWD/zmq.h
Expand Down
10 changes: 5 additions & 5 deletions travis_ci/test_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
export C_INCLUDE_PATH=${C_INCLUDE_PATH}:./

pushd lib
ln -s libzmq.so.4 libzmq.so
ln -s libzmq.so.5 libzmq.so
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD
export LIBRARY_PATH=$LIBRARY_PATH:$PWD
export ZMQ_H=$PWD/zmq.h
Expand All @@ -15,10 +15,10 @@ cd ..
# Build library and examples
# ==========================

make || (ls ; exit 1)
make -j 4 || (ls ; exit 1)
pushd examples
FC="gfortran -g -O2 -fopenmp"
make || (ls ; exit 1)
make -j 4 || (ls ; exit 1)


# Run tests
Expand Down Expand Up @@ -61,5 +61,5 @@ EOF
./hwclient_msg > hwclient_msg.out ;
wait

diff hwserver_msg.out ref1 || exit 1
diff hwclient_msg.out ref2 || exit 1
diff hwserver_msg.out ref1 || exit 1 && echo server OK
diff hwclient_msg.out ref2 || exit 1 && echo client OK

0 comments on commit 003176e

Please sign in to comment.