aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/distrib/python/run_distrib_test.sh
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-05-18 15:06:21 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-05-18 15:06:21 -0700
commit9780f59a06ebe8a2f4c971f2984d3236a027392c (patch)
treeb5019158a1407d048ce274647f9ad3d3b8794e9a /test/distrib/python/run_distrib_test.sh
parent68897999237ab5d67278365b3bd444960fa3c4c0 (diff)
parentfcbe7daf832dcb616fc93ca59c3b1aab279f510e (diff)
Merge github.com:grpc/grpc into signal_handler
Diffstat (limited to 'test/distrib/python/run_distrib_test.sh')
-rwxr-xr-xtest/distrib/python/run_distrib_test.sh26
1 files changed, 17 insertions, 9 deletions
diff --git a/test/distrib/python/run_distrib_test.sh b/test/distrib/python/run_distrib_test.sh
index 79893af8e5..8a983bc248 100755
--- a/test/distrib/python/run_distrib_test.sh
+++ b/test/distrib/python/run_distrib_test.sh
@@ -33,8 +33,8 @@ set -ex
cd $(dirname $0)
# Pick up the source dist archive whatever its version is
-SDIST_ARCHIVE=$EXTERNAL_GIT_ROOT/input_artifacts/grpcio-*.tar.gz
-BDIST_DIR="file://$EXTERNAL_GIT_ROOT/input_artifacts"
+BDIST_ARCHIVES=$EXTERNAL_GIT_ROOT/input_artifacts/grpcio-*.whl
+TOOLS_BDIST_ARCHIVES=$EXTERNAL_GIT_ROOT/input_artifacts/grpcio_tools-*.whl
if [ ! -f ${SDIST_ARCHIVE} ]
then
@@ -42,17 +42,25 @@ then
exit 1
fi
-PIP=pip2
-which $PIP || PIP=pip
PYTHON=python2
+PIP=pip2
which $PYTHON || PYTHON=python
+which $PIP || PIP=pip
# TODO(jtattermusch): this shouldn't be required
-$PIP install --upgrade six
+# TODO(jtattermusch): run the command twice to workaround docker-on-overlay
+# issue https://github.com/docker/docker/issues/12327
+# (first attempt will fail when using docker with overlayFS)
+${PIP} install --upgrade six pip || ${PIP} install --upgrade six pip
-GRPC_PYTHON_BINARIES_REPOSITORY="${BDIST_DIR}" \
- $PIP install \
- ${SDIST_ARCHIVE}
+# At least one of the bdist packages has to succeed (whichever one matches the
+# test machine, anyway).
+for bdist in ${BDIST_ARCHIVES} ${TOOLS_BDIST_ARCHIVES}; do
+ ($PYTHON -m pip install $bdist) || true
+done
-$PYTHON distribtest.py
+# TODO(jtattermusch): add a .proto file to the distribtest, generate python
+# code from it and then use the generated code from distribtest.py
+$PYTHON -m grpc.tools.protoc
+$PYTHON distribtest.py