Merge branch 'master' of github.com:grpc/grpc into unsecure-no-really-this-time

pull/1350/head
Nicolas "Pixel" Noble 10 years ago
commit 6142c7511f
  1. 2
      src/core/support/histogram.c
  2. 14
      tools/dockerfile/grpc_cxx/build.sh
  3. 9
      tools/dockerfile/grpc_java/build.sh
  4. 61
      tools/gce_setup/private_build_and_test.sh
  5. 2
      tools/run_tests/run_tests.py

@ -76,7 +76,7 @@ static size_t bucket_for_unchecked(gpr_histogram *h, double x) {
/* bounds checked version of the above */
static size_t bucket_for(gpr_histogram *h, double x) {
size_t bucket = bucket_for_unchecked(h, GPR_CLAMP(x, 0, h->max_possible));
size_t bucket = bucket_for_unchecked(h, GPR_CLAMP(x, 1.0, h->max_possible));
GPR_ASSERT(bucket < h->num_buckets);
return bucket;
}

@ -0,0 +1,14 @@
#!/bin/bash
rm -rf /var/local/git
cp -R /var/local/git-clone /var/local/git
cd /var/local/git/grpc/third_party/protobuf && \
./autogen.sh && \
./configure --prefix=/usr && \
make -j12 && make check && make install && make clean
cd /var/local/git/grpc && ls \
&& make clean \
&& make gens/test/cpp/util/messages.pb.cc \
&& make interop_client \
&& make interop_server

@ -0,0 +1,9 @@
#!/bin/bash
rm -rf /var/local/git
cp -R /var/local/git-clone /var/local/git
cd /var/local/git/grpc-java/lib/netty && \
mvn -pl codec-http2 -am -DskipTests install clean
cd /var/local/git/grpc-java && \
./gradlew build
echo 'build finished'

@ -0,0 +1,61 @@
#!/bin/bash
# This script has to be run from the same directory as grpc_docker.sh and after grpc_docker.sh is sourced
#
# Sample Usage:
# ===============================
# ./private_build_and_test.sh [language] [environment: interop|cloud] [test case]
# [git base directory] [server name in interop environment]
# sh private_build_and_test.sh java interop large_unary /usr/local/google/home/donnadionne/grpc-git grpc-docker-server1
# sh private_build_and_test.sh java cloud large_unary /usr/local/google/home/donnadionne/grpc-git
# ===============================
# Arguments
LANGUAGE=$1
ENV=$2
TEST=$3
GIT=$4
PROJECT=${5:-"stoked-keyword-656"}
ZONE=${6:-"asia-east1-a"}
CLIENT=${7:-"grpc-docker-testclients1"}
SERVER=${8:-"grpc-docker-server"}
current_time=$(date "+%Y-%m-%d-%H-%M-%S")
result_file_name=private_result.$current_time.txt
sudo docker run --name="private_images" -v $GIT:/var/local/git-clone grpc/$LANGUAGE /var/local/git-clone/grpc/tools/dockerfile/grpc_$LANGUAGE/build.sh
sudo docker commit -m "private image" -a $USER private_images grpc/private_images
sudo docker tag -f grpc/private_images 0.0.0.0:5000/grpc/private_images
sudo docker push 0.0.0.0:5000/grpc/private_images
sudo docker rmi -f grpc/private_images
sudo docker rm private_images
gcloud compute --project $PROJECT ssh --zone $ZONE $CLIENT --command "sudo docker pull 0.0.0.0:5000/grpc/private_images"
gcloud compute --project $PROJECT ssh --zone $ZONE $CLIENT --command "sudo docker tag 0.0.0.0:5000/grpc/private_images grpc/$LANGUAGE"
source grpc_docker.sh
if [ $ENV == 'interop' ]
then
grpc_interop_test $TEST $CLIENT $LANGUAGE $SERVER cxx
grpc_interop_test $TEST $CLIENT $LANGUAGE $SERVER java
grpc_interop_test $TEST $CLIENT $LANGUAGE $SERVER go
grpc_interop_test $TEST $CLIENT $LANGUAGE $SERVER ruby
grpc_interop_test $TEST $CLIENT $LANGUAGE $SERVER node
grpc_interop_test $TEST $CLIENT $LANGUAGE $SERVER python
else
if [ $ENV == 'cloud' ]
then
grpc_cloud_prod_test $TEST $CLIENT $LANGUAGE > /tmp/$result_file_name 2>&1
gsutil cp /tmp/$result_file_name gs://$PROJECT-output/private_result/$result_file_name
else
grpc_cloud_prod_auth_test $TEST $CLIENT $LANGUAGE
fi
fi

@ -259,7 +259,7 @@ class Build(object):
return []
def make_targets(self):
return ['all']
return ['static']
def build_steps(self):
return []

Loading…
Cancel
Save