diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2016-02-04 10:06:26 -0800 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2016-02-04 14:29:50 -0800 |
commit | eae8fc4a8bbfa0370137b2d870805005eb4a8f63 (patch) | |
tree | 4a3f6ec07b07a8bf6f085c825f53e40ec5b76e51 /test/distrib/python | |
parent | a7a50785be7926a53053cc54fe7ee737d06802b6 (diff) |
python distrib smoketest
Diffstat (limited to 'test/distrib/python')
-rw-r--r-- | test/distrib/python/distribtest.py | 7 | ||||
-rwxr-xr-x | test/distrib/python/run_distrib_test.sh | 24 |
2 files changed, 30 insertions, 1 deletions
diff --git a/test/distrib/python/distribtest.py b/test/distrib/python/distribtest.py new file mode 100644 index 0000000000..428ffe2b34 --- /dev/null +++ b/test/distrib/python/distribtest.py @@ -0,0 +1,7 @@ +from grpc.beta import implementations + +# This code doesn't do much but makes sure the native extension is loaded +# which is what we are testing here. +channel = implementations.insecure_channel('localhost', 1000) +del channel +print 'Success!' diff --git a/test/distrib/python/run_distrib_test.sh b/test/distrib/python/run_distrib_test.sh index 34e3efccbd..a185bcbc26 100755 --- a/test/distrib/python/run_distrib_test.sh +++ b/test/distrib/python/run_distrib_test.sh @@ -32,5 +32,27 @@ set -ex cd $(dirname $0) -pip install "$EXTERNAL_GIT_ROOT/input_artifacts/grpcio-0.12.0b6.tar.gz" +# TODO(jtattermusch): replace the version number +SDIST_ARCHIVE="$EXTERNAL_GIT_ROOT/input_artifacts/grpcio-0.12.0b8.tar.gz" +BDIST_DIR="file://$EXTERNAL_GIT_ROOT/input_artifacts" +if [ ! -f "${SDIST_ARCHIVE}" ] +then + echo "Archive ${SDIST_ARCHIVE} does not exist." + exit 1 +fi + +# TODO(jtattermusch): this shouldn't be required +pip install --upgrade six + +# TODO(jtattermusch): if these don't get preinstalled, pip tries to install them +# with --use-grpc-custom-bdist option, which obviously fails. +pip install --upgrade enum34 +pip install --upgrade futures + +GRPC_PYTHON_BINARIES_REPOSITORY="${BDIST_DIR}" \ + pip install \ + "${SDIST_ARCHIVE}" \ + --install-option="--use-grpc-custom-bdist" + +python distribtest.py |