From 80db5be7b515bc2f86c8cd2d6ce86f6aebf19f00 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 24 Feb 2016 21:35:56 -0800 Subject: fix bug with pecl install on mac --- tools/run_tests/artifact_targets.py | 12 ++++++++---- tools/run_tests/distribtest_targets.py | 21 +++++++++++++-------- 2 files changed, 21 insertions(+), 12 deletions(-) (limited to 'tools') 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', -- cgit v1.2.3