Fix interop Python test invocation

The ideal fix would be to have a tox test command for running the
interop server and client.
pull/4323/head
Masood Malekghassemi 9 years ago
parent 070b91c3f2
commit eaa7d203b5
  1. 8
      src/python/grpcio/tests/_loader.py
  2. 5
      src/python/grpcio/tox.ini
  3. 1
      tools/jenkins/grpc_interop_python/Dockerfile
  4. 2
      tools/run_tests/build_python.sh
  5. 4
      tools/run_tests/run_interop_tests.py

@ -34,14 +34,6 @@ import unittest
import coverage import coverage
# Some global spooky-action-at-a-distance hackery to get around
# system-installation issues where the google namespace is defaulted to the
# system even though the egg is higher priority on sys.path. This inverts the
# path priority on package module paths thus giving any installed eggs higher
# priority and having little effect otherwise.
import google
google.__path__.reverse()
TEST_MODULE_REGEX = r'^.*_test$' TEST_MODULE_REGEX = r'^.*_test$'

@ -15,8 +15,5 @@ commands =
coverage html --include='grpc/*' --omit='grpc/framework/alpha/*','grpc/early_adopter/*','grpc/framework/base/*','grpc/framework/face/*','grpc/_adapter/fore.py','grpc/_adapter/rear.py' coverage html --include='grpc/*' --omit='grpc/framework/alpha/*','grpc/early_adopter/*','grpc/framework/base/*','grpc/framework/face/*','grpc/_adapter/fore.py','grpc/_adapter/rear.py'
coverage report --include='grpc/*' --omit='grpc/framework/alpha/*','grpc/early_adopter/*','grpc/framework/base/*','grpc/framework/face/*','grpc/_adapter/fore.py','grpc/_adapter/rear.py' coverage report --include='grpc/*' --omit='grpc/framework/alpha/*','grpc/early_adopter/*','grpc/framework/base/*','grpc/framework/face/*','grpc/_adapter/fore.py','grpc/_adapter/rear.py'
deps = deps =
cython -rrequirements.txt
coverage
oauth2client
protobuf
passenv = * passenv = *

@ -75,6 +75,7 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
# Install Python requisites # Install Python requisites
RUN /bin/bash -l -c "pip install --upgrade pip" RUN /bin/bash -l -c "pip install --upgrade pip"
RUN /bin/bash -l -c "pip install virtualenv" RUN /bin/bash -l -c "pip install virtualenv"
RUN /bin/bash -l -c "pip install tox"
# Define the default command. # Define the default command.
CMD ["bash"] CMD ["bash"]

@ -45,3 +45,5 @@ export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1
cd $GRPCIO cd $GRPCIO
tox --notest tox --notest
$GRPCIO/.tox/py27/bin/python $GRPCIO/setup.py build

@ -267,7 +267,7 @@ class PythonLanguage:
def client_cmd(self, args): def client_cmd(self, args):
return [ return [
'python2.7_virtual_environment/bin/python', 'src/python/grpcio/.tox/py27/bin/python',
'src/python/grpcio/setup.py', 'src/python/grpcio/setup.py',
'run_interop', 'run_interop',
'--client', '--client',
@ -279,7 +279,7 @@ class PythonLanguage:
def server_cmd(self, args): def server_cmd(self, args):
return [ return [
'python2.7_virtual_environment/bin/python', 'src/python/grpcio/.tox/py27/bin/python',
'src/python/grpcio/setup.py', 'src/python/grpcio/setup.py',
'run_interop', 'run_interop',
'--server', '--server',

Loading…
Cancel
Save