Fix the Python source distribtest script

pull/15202/head
Mehrdad Afshari 7 years ago
parent 97904d46e0
commit f4bea02a72
  1. 18
      test/distrib/python/test_packages.sh
  2. 8
      tools/run_tests/artifacts/distribtest_targets.py

@ -22,12 +22,14 @@ shopt -s nullglob
if [[ "$1" == "binary" ]] if [[ "$1" == "binary" ]]
then then
echo "Testing Python binary distribution" echo "Testing Python binary distribution"
ARCHIVES=("$EXTERNAL_GIT_ROOT"/input_artifacts/grpcio-*.whl) ARCHIVES=("$EXTERNAL_GIT_ROOT"/input_artifacts/grpcio-[0-9]*.whl)
TOOLS_ARCHIVES=("$EXTERNAL_GIT_ROOT"/input_artifacts/grpcio_tools-*.whl) TOOLS_ARCHIVES=("$EXTERNAL_GIT_ROOT"/input_artifacts/grpcio_tools-[0-9]*.whl)
else else
echo "Testing Python source distribution" echo "Testing Python source distribution"
ARCHIVES=("$EXTERNAL_GIT_ROOT"/input_artifacts/grpcio-*.tar.gz) ARCHIVES=("$EXTERNAL_GIT_ROOT"/input_artifacts/grpcio-[0-9]*.tar.gz)
TOOLS_ARCHIVES=("$EXTERNAL_GIT_ROOT"/input_artifacts/grpcio_tools-*.tar.gz) TOOLS_ARCHIVES=("$EXTERNAL_GIT_ROOT"/input_artifacts/grpcio-tools-[0-9]*.tar.gz)
HEALTH_ARCHIVES=("$EXTERNAL_GIT_ROOT"/input_artifacts/grpcio-health-checking-[0-9]*.tar.gz)
REFLECTION_ARCHIVES=("$EXTERNAL_GIT_ROOT"/input_artifacts/grpcio-reflection-[0-9]*.tar.gz)
fi fi
VIRTUAL_ENV=$(mktemp -d) VIRTUAL_ENV=$(mktemp -d)
@ -52,6 +54,14 @@ function at_least_one_installs() {
at_least_one_installs "${ARCHIVES[@]}" at_least_one_installs "${ARCHIVES[@]}"
at_least_one_installs "${TOOLS_ARCHIVES[@]}" at_least_one_installs "${TOOLS_ARCHIVES[@]}"
if [[ "$1" == "source" ]]
then
echo "Testing Python health and reflection packages"
at_least_one_installs "${HEALTH_ARCHIVES[@]}"
at_least_one_installs "${REFLECTION_ARCHIVES[@]}"
fi
# #
# Test our distributions # Test our distributions
# #

@ -167,15 +167,15 @@ class PythonDistribTest(object):
if self.source: if self.source:
return create_docker_jobspec( return create_docker_jobspec(
self.name, self.name,
'tools/dockerfile/distribtest/python_dev_%s_%s' % ( 'tools/dockerfile/distribtest/python_dev_%s_%s' %
self.docker_suffix, self.arch), (self.docker_suffix, self.arch),
'test/distrib/python/run_source_distrib_test.sh', 'test/distrib/python/run_source_distrib_test.sh',
copy_rel_path='test/distrib') copy_rel_path='test/distrib')
else: else:
return create_docker_jobspec( return create_docker_jobspec(
self.name, self.name,
'tools/dockerfile/distribtest/python_%s_%s' % ( 'tools/dockerfile/distribtest/python_%s_%s' %
self.docker_suffix, self.arch), (self.docker_suffix, self.arch),
'test/distrib/python/run_binary_distrib_test.sh', 'test/distrib/python/run_binary_distrib_test.sh',
copy_rel_path='test/distrib') copy_rel_path='test/distrib')

Loading…
Cancel
Save