aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests
diff options
context:
space:
mode:
Diffstat (limited to 'tools/run_tests')
-rw-r--r--tools/run_tests/artifact_targets.py12
-rwxr-xr-xtools/run_tests/build_artifact_python.sh13
-rw-r--r--tools/run_tests/distribtest_targets.py21
3 files changed, 32 insertions, 14 deletions
diff --git a/tools/run_tests/artifact_targets.py b/tools/run_tests/artifact_targets.py
index 803d3d106b..288a3f0154 100644
--- a/tools/run_tests/artifact_targets.py
+++ b/tools/run_tests/artifact_targets.py
@@ -254,10 +254,14 @@ class PHPArtifact:
return []
def build_jobspec(self):
- return create_docker_jobspec(
- self.name,
- 'tools/dockerfile/grpc_artifact_linux_{}'.format(self.arch),
- 'tools/run_tests/build_artifact_php.sh')
+ if self.platform == 'linux':
+ return create_docker_jobspec(
+ self.name,
+ 'tools/dockerfile/grpc_artifact_linux_{}'.format(self.arch),
+ 'tools/run_tests/build_artifact_php.sh')
+ else:
+ return create_jobspec(self.name,
+ ['tools/run_tests/build_artifact_php.sh'])
class ProtocArtifact:
"""Builds protoc and protoc-plugin artifacts"""
diff --git a/tools/run_tests/build_artifact_python.sh b/tools/run_tests/build_artifact_python.sh
index 6e7ab911d5..7ba04d7546 100755
--- a/tools/run_tests/build_artifact_python.sh
+++ b/tools/run_tests/build_artifact_python.sh
@@ -39,6 +39,14 @@ then
pip install -rrequirements.txt
fi
+# Build the source distribution first because MANIFEST.in cannot override
+# exclusion of built shared objects among package resources (for some
+# inexplicable reason).
+GRPC_PYTHON_USE_CUSTOM_BDIST=0 \
+GRPC_PYTHON_BUILD_WITH_CYTHON=1 \
+${SETARCH_CMD} python setup.py \
+ sdist
+
# The bdist_wheel_grpc_custom command is finicky about command output ordering
# and thus ought to be run in a shell command separate of others. Further, it
# trashes the actual bdist_wheel output, so it should be run first so that
@@ -48,11 +56,12 @@ GRPC_PYTHON_BUILD_WITH_CYTHON=1 \
${SETARCH_CMD} python setup.py \
build_tagged_ext
+# Wheel has a bug where directories don't get excluded.
+# https://bitbucket.org/pypa/wheel/issues/99/cannot-exclude-directory
GRPC_PYTHON_USE_CUSTOM_BDIST=0 \
GRPC_PYTHON_BUILD_WITH_CYTHON=1 \
${SETARCH_CMD} python setup.py \
- bdist_wheel \
- sdist
+ bdist_wheel
mkdir -p artifacts
diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py
index 0c02344d90..933103f0a0 100644
--- a/tools/run_tests/distribtest_targets.py
+++ b/tools/run_tests/distribtest_targets.py
@@ -201,7 +201,7 @@ class RubyDistribTest(object):
class PHPDistribTest(object):
"""Tests PHP package"""
- def __init__(self, platform, arch, docker_suffix):
+ def __init__(self, platform, arch, docker_suffix=None):
self.name = 'php_%s_%s_%s' % (platform, arch, docker_suffix)
self.platform = platform
self.arch = arch
@@ -212,15 +212,19 @@ class PHPDistribTest(object):
return []
def build_jobspec(self):
- if not self.platform == 'linux':
+ if self.platform == 'linux':
+ return create_docker_jobspec(self.name,
+ 'tools/dockerfile/distribtest/php_%s_%s' % (
+ self.docker_suffix,
+ self.arch),
+ 'test/distrib/php/run_distrib_test.sh')
+ elif self.platform == 'macos':
+ return create_jobspec(self.name,
+ ['test/distrib/php/run_distrib_test.sh'],
+ environ={'EXTERNAL_GIT_ROOT': '../../..'})
+ else:
raise Exception("Not supported yet.")
- return create_docker_jobspec(self.name,
- 'tools/dockerfile/distribtest/php_%s_%s' % (
- self.docker_suffix,
- self.arch),
- 'test/distrib/php/run_distrib_test.sh')
-
def __str__(self):
return self.name
@@ -271,6 +275,7 @@ def targets():
NodeDistribTest('macos', 'x64', None, '5'),
NodeDistribTest('linux', 'x86', 'jessie', '4'),
PHPDistribTest('linux', 'x64', 'jessie'),
+ PHPDistribTest('macos', 'x64'),
] + [
NodeDistribTest('linux', 'x64', os, version)
for os in ('wheezy', 'jessie', 'ubuntu1204', 'ubuntu1404',