aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-02-25 08:56:08 -0800
committerGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-02-25 08:56:08 -0800
commit74b5b7e10e85987ec937961f05ef3e746f8f9c36 (patch)
tree96b3414a494e83440d32482fd28abf1584895a93 /tools
parent296f9a776286d73d1b3348c7b1379d78d1ee0290 (diff)
parent6b57328ead62e8444eab96ca5ca00ebfeb72d8f1 (diff)
Merge pull request #5407 from stanley-cheung/fix-php-mac-pecl-package
Fix PHP pecl package build on Mac
Diffstat (limited to 'tools')
-rw-r--r--tools/run_tests/artifact_targets.py12
-rw-r--r--tools/run_tests/distribtest_targets.py21
2 files changed, 21 insertions, 12 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/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',