Merge pull request #6014 from nicolasnoble/manual-upmerge

Manual upmerge from 0.13
pull/6013/merge
Jan Tattermusch 9 years ago
commit 353729a852
  1. 2
      src/core/lib/iomgr/pollset_set_windows.c
  2. 15
      src/ruby/ext/grpc/rb_byte_buffer.c
  3. 14
      src/ruby/ext/grpc/rb_call.c
  4. 22
      test/distrib/node/run_distrib_test.sh
  5. 2
      tools/run_tests/build_artifact_node.sh
  6. 13
      tools/run_tests/build_artifact_python.sh
  7. 2
      tools/run_tests/build_node.sh
  8. 2
      tools/run_tests/build_package_node.sh
  9. 2
      tools/run_tests/pre_build_node.sh
  10. 2
      tools/run_tests/run_node.sh

@ -37,7 +37,7 @@
#include "src/core/lib/iomgr/pollset_set_windows.h"
grpc_pollset_set* grpc_pollset_set_create(pollset_set) { return NULL; }
grpc_pollset_set* grpc_pollset_set_create(void) { return NULL; }
void grpc_pollset_set_destroy(grpc_pollset_set* pollset_set) {}

@ -50,21 +50,18 @@ grpc_byte_buffer* grpc_rb_s_to_byte_buffer(char *string, size_t length) {
}
VALUE grpc_rb_byte_buffer_to_s(grpc_byte_buffer *buffer) {
size_t length = 0;
char *string = NULL;
size_t offset = 0;
VALUE rb_string;
grpc_byte_buffer_reader reader;
gpr_slice next;
if (buffer == NULL) {
return Qnil;
}
length = grpc_byte_buffer_length(buffer);
string = xmalloc(length + 1);
rb_string = rb_str_buf_new(grpc_byte_buffer_length(buffer));
grpc_byte_buffer_reader_init(&reader, buffer);
while (grpc_byte_buffer_reader_next(&reader, &next) != 0) {
memcpy(string + offset, GPR_SLICE_START_PTR(next), GPR_SLICE_LENGTH(next));
offset += GPR_SLICE_LENGTH(next);
rb_str_cat(rb_string, (const char *) GPR_SLICE_START_PTR(next),
GPR_SLICE_LENGTH(next));
gpr_slice_unref(next);
}
return rb_str_new(string, length);
return rb_string;
}

@ -551,13 +551,26 @@ static void grpc_run_batch_stack_init(run_batch_stack *st,
/* grpc_run_batch_stack_cleanup ensures the run_batch_stack is properly
* cleaned up */
static void grpc_run_batch_stack_cleanup(run_batch_stack *st) {
size_t i = 0;
grpc_metadata_array_destroy(&st->send_metadata);
grpc_metadata_array_destroy(&st->send_trailing_metadata);
grpc_metadata_array_destroy(&st->recv_metadata);
grpc_metadata_array_destroy(&st->recv_trailing_metadata);
if (st->recv_status_details != NULL) {
gpr_free(st->recv_status_details);
}
if (st->recv_message != NULL) {
grpc_byte_buffer_destroy(st->recv_message);
}
for (i = 0; i < st->op_num; i++) {
if (st->ops[i].op == GRPC_OP_SEND_MESSAGE) {
grpc_byte_buffer_destroy(st->ops[i].data.send_message);
}
}
}
/* grpc_run_batch_stack_fill_ops fills the run_batch_stack ops array from
@ -643,7 +656,6 @@ static VALUE grpc_run_batch_stack_build_result(run_batch_stack *st) {
break;
case GRPC_OP_SEND_MESSAGE:
rb_struct_aset(result, sym_send_message, Qtrue);
grpc_byte_buffer_destroy(st->ops[i].data.send_message);
break;
case GRPC_OP_SEND_CLOSE_FROM_CLIENT:
rb_struct_aset(result, sym_send_close, Qtrue);

@ -28,23 +28,31 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
function finish() {
rv=$?
kill $STATIC_PID || true
curl "localhost:32767/drop/$STATIC_PORT" || true
exit $rv
}
trap finish EXIT
NODE_VERSION=$1
source ~/.nvm/nvm.sh
set -ex
cd $(dirname $0)
nvm install $NODE_VERSION
set -ex
npm install -g node-static
# Kill off existing static servers
kill -9 $(ps aux | grep '[n]ode .*static' | awk '{print $2}') || true
STATIC_SERVER=127.0.0.1
STATIC_PORT=8080
# If port_server is running, get port from that. Otherwise, assume we're in
# docker and use 8080
STATIC_PORT=$(curl 'localhost:32767/get' || echo '8080')
# Serves the input_artifacts directory statically at localhost:8080
# Serves the input_artifacts directory statically at localhost:
static "$EXTERNAL_GIT_ROOT/input_artifacts" -a $STATIC_SERVER -p $STATIC_PORT &
STATIC_PID=$!
@ -52,6 +60,4 @@ STATIC_URL="http://$STATIC_SERVER:$STATIC_PORT/"
npm install --unsafe-perm $STATIC_URL/grpc.tgz --grpc_node_binary_host_mirror=$STATIC_URL
kill -9 $STATIC_PID
./distrib_test.js

@ -30,9 +30,9 @@
NODE_TARGET_ARCH=$1
source ~/.nvm/nvm.sh
set -ex
nvm use 4
set -ex
cd $(dirname $0)/../..

@ -35,15 +35,18 @@ cd $(dirname $0)/../..
if [ "$SKIP_PIP_INSTALL" == "" ]
then
pip install --upgrade six
pip install --upgrade setuptools
# There's a bug in newer versions of setuptools (see
# https://bitbucket.org/pypa/setuptools/issues/503/pkg_resources_vendorpackagingrequirementsi)
pip install --upgrade 'setuptools==18'
pip install -rrequirements.txt
fi
export GRPC_PYTHON_USE_CUSTOM_BDIST=0
export GRPC_PYTHON_BUILD_WITH_CYTHON=1
# Build the source distribution first because MANIFEST.in cannot override
# exclusion of built shared objects among package resources (for some
# inexplicable reason).
GRPC_PYTHON_USE_CUSTOM_BDIST=0 \
GRPC_PYTHON_BUILD_WITH_CYTHON=1 \
${SETARCH_CMD} python setup.py \
sdist
@ -51,15 +54,11 @@ ${SETARCH_CMD} python setup.py \
# and thus ought to be run in a shell command separate of others. Further, it
# trashes the actual bdist_wheel output, so it should be run first so that
# bdist_wheel may be run unmolested.
GRPC_PYTHON_USE_CUSTOM_BDIST=0 \
GRPC_PYTHON_BUILD_WITH_CYTHON=1 \
${SETARCH_CMD} python setup.py \
build_tagged_ext
# Wheel has a bug where directories don't get excluded.
# https://bitbucket.org/pypa/wheel/issues/99/cannot-exclude-directory
GRPC_PYTHON_USE_CUSTOM_BDIST=0 \
GRPC_PYTHON_BUILD_WITH_CYTHON=1 \
${SETARCH_CMD} python setup.py \
bdist_wheel

@ -31,9 +31,9 @@
NODE_VERSION=$1
source ~/.nvm/nvm.sh
set -ex
nvm use $NODE_VERSION
set -ex
CONFIG=${CONFIG:-opt}

@ -29,9 +29,9 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
source ~/.nvm/nvm.sh
set -ex
nvm use 4
set -ex
cd $(dirname $0)/../..

@ -31,9 +31,9 @@
NODE_VERSION=$1
source ~/.nvm/nvm.sh
set -ex
nvm use $NODE_VERSION
set -ex
export GRPC_CONFIG=${CONFIG:-opt}

@ -30,9 +30,9 @@
NODE_VERSION=$1
source ~/.nvm/nvm.sh
set -ex
nvm use $NODE_VERSION
set -ex
CONFIG=${CONFIG:-opt}

Loading…
Cancel
Save