Skip to content
Permalink
Browse files
Problem: test timeout in zyre.c:608 may be too short
Especially under CI.

Solution: increase somewhat.
  • Loading branch information
hintjens committed Feb 4, 2016
1 parent 91a2289 commit 991298ef9428618d6ee12d597a5b71c9e747c44f
Show file tree
Hide file tree
Showing 75 changed files with 1,844 additions and 314 deletions.
@@ -100,6 +100,17 @@ ELSE (LIBZMQ_FOUND)
message( FATAL_ERROR "libzmq not found." )
ENDIF (LIBZMQ_FOUND)

########################################################################
# UUID dependency
########################################################################
find_package(uuid)
IF (UUID_FOUND)
include_directories(${UUID_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${UUID_LIBRARIES})
add_definitions(-DHAVE_UUID)
list(APPEND OPTIONAL_LIBRARIES ${UUID_LIBRARIES})
ENDIF (UUID_FOUND)

########################################################################
# CZMQ dependency
########################################################################
@@ -0,0 +1,47 @@
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################

if (NOT MSVC)
include(FindPkgConfig)
pkg_check_modules(PC_UUID "uuid")
if (NOT PC_UUID_FOUND)
pkg_check_modules(PC_UUID "uuid")
endif (NOT PC_UUID_FOUND)
if (PC_UUID_FOUND)
# some libraries install the headers is a subdirectory of the include dir
# returned by pkg-config, so use a wildcard match to improve chances of finding
# headers and SOs.
set(PC_UUID_INCLUDE_HINTS ${PC_UUID_INCLUDE_DIRS} ${PC_UUID_INCLUDE_DIRS}/*)
set(PC_UUID_LIBRARY_HINTS ${PC_UUID_LIBRARY_DIRS} ${PC_UUID_LIBRARY_DIRS}/*)
endif(PC_UUID_FOUND)
endif (NOT MSVC)

find_path (
UUID_INCLUDE_DIRS
NAMES uuid/uuid.h
HINTS ${PC_UUID_INCLUDE_HINTS}
)

find_library (
UUID_LIBRARIES
NAMES uuid
HINTS ${PC_UUID_LIBRARY_HINTS}
)

include(FindPackageHandleStandardArgs)

find_package_handle_standard_args(
UUID
REQUIRED_VARS UUID_LIBRARIES UUID_INCLUDE_DIRS
)
mark_as_advanced(
UUID_FOUND
UUID_LIBRARIES UUID_INCLUDE_DIRS
)

################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################
@@ -12,10 +12,11 @@ AM_CFLAGS = \
AM_CPPFLAGS = \
${libsodium_CFLAGS} \
${libzmq_CFLAGS} \
${uuid_CFLAGS} \
${czmq_CFLAGS} \
-I$(srcdir)/include

project_libs = ${libsodium_LIBS} ${libzmq_LIBS} ${czmq_LIBS}
project_libs = ${libsodium_LIBS} ${libzmq_LIBS} ${uuid_LIBS} ${czmq_LIBS}

SUBDIRS = doc
DIST_SUBDIRS = doc
@@ -30,10 +31,10 @@ EXTRA_DIST = \
src/zyre_peer.h \
src/zyre_group.h \
src/zyre_node.h \
src/zyre_classes.h \
LICENSE \
README.md \
CONTRIBUTING.md
CONTRIBUTING.md \
src/zyre_classes.h

include $(srcdir)/src/Makemodule.am

@@ -7,14 +7,15 @@ find_package (JNI REQUIRED)
find_library (ZMQ_LIBRARY NAMES zmq libzmq REQUIRED)
find_library (ZYRE_LIBRARY NAMES zyre REQUIRED)

include_directories (${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2} src/native/include)
include_directories (${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2} ../../include src/native/include)

set (zyrejni_sources
src/main/c/org_zeromq_zyre_Zyre.c
src/main/c/org_zeromq_zyre_ZyreEvent.c
)

add_library (zyrejni SHARED ${zyrejni_sources})
add_definitions (-DZYRE_BUILD_DRAFT_API)

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -O2")
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)
@@ -4,12 +4,12 @@ JNI Binding for zyre

## Building the JNI Layer for Linux

Ensure you have cmake installed, then run:
Ensure you have gradle and cmake installed, then run:

./gradle build jar
./gradle test
gradle build jar
gradle test

This calls javah to build the headers in src/native/c, and then compiles the C and Java pieces to create a jar file a sharable library (.so).
This calls javah to build the headers in src/native/include, and then compiles the C and Java pieces to create a jar file a sharable library (.so).

## Building the JNI Layer for Android

@@ -27,6 +27,7 @@ set (zyrejni_sources
)

add_library (zyrejni SHARED ${zyrejni_sources})
add_definitions (-DZYRE_BUILD_DRAFT_API)
target_link_libraries (zyrejni
zyre
zmq
@@ -0,0 +1,75 @@
@ECHO OFF
:- configure.bat creates platform.h and configures the build process
:- You MUST run this before building via msbuild or VisualStudio.

IF %1.==--help. (
ECHO Syntax: configure [ switch ]
ECHO --help show this help
ECHO --enable-drafts from zip package, enables DRAFT API
ECHO --disable-drafts from git repository, disables DRAFT API
ECHO --without-perf_local do not build perf_local.exe
ECHO --without-perf_remote do not build perf_remote.exe
ECHO --without-zpinger do not build zpinger.exe
ECHO --without-ztester_beacon do not build ztester_beacon.exe
ECHO --without-ztester_gossip do not build ztester_gossip.exe
ECHO --without-zyre_selftest do not build zyre_selftest.exe
GOTO END
)
ECHO Configuring zyre...

ECHO // Generated by configure.bat> platform.h
ECHO. >> platform.h
ECHO #ifndef __PLATFORM_H_INCLUDED__>> platform.h
ECHO #define __PLATFORM_H_INCLUDED__>> platform.h
ECHO. >> platform.h
ECHO #define ZYRE_HAVE_WINDOWS 1>> platform.h

:- Check for dependencies
IF EXIST "..\..\..\libsodium" (
ECHO Building with libsodium
ECHO #define HAVE_LIBSODIUM 1>> platform.h
) ELSE (
ECHO Building without libsodium
ECHO #undef HAVE_LIBSODIUM>> platform.h
)
IF EXIST "..\..\..\libzmq" (
ECHO Building with libzmq
ECHO #define HAVE_LIBZMQ 1>> platform.h
) ELSE (
ECHO Building without libzmq
ECHO zyre cannot build without libzmq
ECHO Please clone https://github.com/zeromq/libzmq, and then configure & build
ECHO TODO: resolve this problem automatically.
GOTO error
)
IF EXIST "..\..\..\uuid" (
ECHO Building with uuid
ECHO #define HAVE_UUID 1>> platform.h
) ELSE (
ECHO Building without uuid
ECHO #undef HAVE_UUID>> platform.h
)
IF EXIST "..\..\..\czmq" (
ECHO Building with czmq
ECHO #define HAVE_CZMQ 1>> platform.h
) ELSE (
ECHO Building without czmq
ECHO zyre cannot build without czmq
ECHO Please clone https://github.com/zeromq/czmq, and then configure & build
ECHO TODO: resolve this problem automatically.
GOTO error
)

:- Check if we want to build the draft API
IF NOT EXIST "..\..\.git" GOTO no_draft
ECHO Building with draft API (stable + legacy + draft API)
ECHO // Provide draft classes and methods>>platform.h
ECHO #define ZYRE_BUILD_DRAFT_API 1>>platform.h
GOTO end_draft
:no_draft
ECHO Building without draft API (stable + legacy API)
ECHO #undef ZYRE_BUILD_DRAFT_API 1>>platform.h
:end_draft
ECHO. >> platform.h
ECHO #endif>> platform.h
:error
@@ -1,20 +1 @@

/* =========================================================================
platform.h
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################
=========================================================================
*/

#ifndef __PLATFORM_H_INCLUDED__
#define __PLATFORM_H_INCLUDED__

#define ZYRE_HAVE_WINDOWS

#endif
#error "Run configure.bat to create platform.h"
@@ -8,7 +8,7 @@
#include <stdlib.h>
#include <jni.h>
#include "zyre.h"
#include "../../native/include/org_zeromq_zyre_Zyre.h"
#include "org_zeromq_zyre_Zyre.h"

JNIEXPORT jlong JNICALL
Java_org_zeromq_zyre_Zyre__1_1new (JNIEnv *env, jclass c, jstring name)
@@ -8,7 +8,7 @@
#include <stdlib.h>
#include <jni.h>
#include "zyre.h"
#include "../../native/include/org_zeromq_zyre_ZyreEvent.h"
#include "org_zeromq_zyre_ZyreEvent.h"

JNIEXPORT jlong JNICALL
Java_org_zeromq_zyre_ZyreEvent__1_1new (JNIEnv *env, jclass c, jlong node)
@@ -0,0 +1,3 @@
# This is a skeleton created by zproject.
# You can add hand-written code here.
from ._zyre_ctypes import *

0 comments on commit 991298e

Please sign in to comment.