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.py20
-rwxr-xr-xtools/run_tests/build_python.sh6
-rwxr-xr-xtools/run_tests/run_python.sh2
-rwxr-xr-xtools/run_tests/run_tests.py2
4 files changed, 14 insertions, 16 deletions
diff --git a/tools/run_tests/artifact_targets.py b/tools/run_tests/artifact_targets.py
index 288a3f0154..e61c46d8b5 100644
--- a/tools/run_tests/artifact_targets.py
+++ b/tools/run_tests/artifact_targets.py
@@ -69,16 +69,6 @@ def create_jobspec(name, cmdline, environ=None, shell=False,
return jobspec
-def macos_arch_env(arch):
- """Returns environ specifying -arch arguments for make."""
- if arch == 'x86':
- arch_arg = '-arch i386'
- elif arch == 'x64':
- arch_arg = '-arch x86_64'
- else:
- raise Exception('Unsupported arch')
- return {'CFLAGS': arch_arg, 'LDFLAGS': arch_arg}
-
_MACOS_COMPAT_FLAG = '-mmacosx-version-min=10.7'
_ARCH_FLAG_MAP = {
@@ -191,13 +181,17 @@ class CSharpExtArtifact:
environ = {'CONFIG': 'opt',
'EMBED_OPENSSL': 'true',
'EMBED_ZLIB': 'true',
- 'CFLAGS': '-DGPR_BACKWARDS_COMPATIBILITY_MODE'}
+ 'CFLAGS': '-DGPR_BACKWARDS_COMPATIBILITY_MODE',
+ 'LDFLAGS': ''}
if self.platform == 'linux':
return create_docker_jobspec(self.name,
'tools/dockerfile/grpc_artifact_linux_%s' % self.arch,
- 'tools/run_tests/build_artifact_csharp.sh')
+ 'tools/run_tests/build_artifact_csharp.sh',
+ environ=environ)
else:
- environ.update(macos_arch_env(self.arch))
+ archflag = _ARCH_FLAG_MAP[self.arch]
+ environ['CFLAGS'] += ' %s %s' % (archflag, _MACOS_COMPAT_FLAG)
+ environ['LDFLAGS'] += ' %s' % archflag
return create_jobspec(self.name,
['tools/run_tests/build_artifact_csharp.sh'],
environ=environ)
diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh
index f120fc7ed6..79a148faf1 100755
--- a/tools/run_tests/build_python.sh
+++ b/tools/run_tests/build_python.sh
@@ -40,7 +40,11 @@ export PATH=$ROOT/bins/$CONFIG:$ROOT/bins/$CONFIG/protobuf:$PATH
export CFLAGS="-I$ROOT/include -std=gnu99"
export LDFLAGS="-L$ROOT/libs/$CONFIG"
export GRPC_PYTHON_BUILD_WITH_CYTHON=1
-export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1
+
+if [ "$CONFIG" = "gcov" ]
+then
+ export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1
+fi
tox --notest
diff --git a/tools/run_tests/run_python.sh b/tools/run_tests/run_python.sh
index ace49e1514..d4b7250cbb 100755
--- a/tools/run_tests/run_python.sh
+++ b/tools/run_tests/run_python.sh
@@ -40,10 +40,10 @@ export PATH=$ROOT/bins/$CONFIG:$ROOT/bins/$CONFIG/protobuf:$PATH
export CFLAGS="-I$ROOT/include -std=c89"
export LDFLAGS="-L$ROOT/libs/$CONFIG"
export GRPC_PYTHON_BUILD_WITH_CYTHON=1
-export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1
if [ "$CONFIG" = "gcov" ]
then
+ export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1
tox
else
$ROOT/.tox/py27/bin/python $ROOT/setup.py test_lite
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index e687d46342..aa5073fbbd 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -367,7 +367,7 @@ class PythonLanguage(object):
['tools/run_tests/run_python.sh'],
None,
environ=dict(environment.items() +
- [('GPRC_PYTHON_TESTRUNNER_FILTER', suite_name)]),
+ [('GRPC_PYTHON_TESTRUNNER_FILTER', suite_name)]),
shortname='py.test.%s' % suite_name,
timeout_seconds=5*60)
for suite_name in tests_json]