make python test suites run in parallel
diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh
index e0fcbb6..365abb4 100755
--- a/tools/run_tests/build_python.sh
+++ b/tools/run_tests/build_python.sh
@@ -45,3 +45,5 @@
tox --notest
$ROOT/.tox/py27/bin/python $ROOT/setup.py build
+$ROOT/.tox/py27/bin/python $ROOT/setup.py build_py
+$ROOT/.tox/py27/bin/python $ROOT/setup.py gather --test
diff --git a/tools/run_tests/run_python.sh b/tools/run_tests/run_python.sh
index ffe9c12..beb747a 100755
--- a/tools/run_tests/run_python.sh
+++ b/tools/run_tests/run_python.sh
@@ -42,7 +42,12 @@
export GRPC_PYTHON_BUILD_WITH_CYTHON=1
export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1
-tox
+if [ "$CONFIG" = "gcov" ]
+then
+ tox
+else
+ $ROOT/.tox/py27/bin/python $ROOT/setup.py test
+fi
mkdir -p $ROOT/reports
rm -rf $ROOT/reports/python-coverage
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 08a5ff0..c55d1fb 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -353,15 +353,27 @@
_check_compiler(self.args.compiler, ['default'])
def test_specs(self):
+ # load list of known test suites
+ with open('src/python/grpcio/tests/tests.json') as tests_json_file:
+ tests_json = json.load(tests_json_file)
environment = dict(_FORCE_ENVIRON_FOR_WRAPPERS)
environment['PYVER'] = '2.7'
- return [self.config.job_spec(
- ['tools/run_tests/run_python.sh'],
- None,
- environ=environment,
- shortname='py.test',
- timeout_seconds=15*60
- )]
+ if self.config.build_config != 'gcov':
+ return [self.config.job_spec(
+ ['tools/run_tests/run_python.sh'],
+ None,
+ environ=dict(environment.items() +
+ [('GPRC_PYTHON_TESTRUNNER_FILTER', suite_name)]),
+ shortname='py.test.%s' % suite_name,
+ timeout_seconds=5*60)
+ for suite_name in tests_json]
+ else:
+ return [self.config.job_spec(['tools/run_tests/run_python.sh'],
+ None,
+ environ=environment,
+ shortname='py.test.coverage',
+ timeout_seconds=15*60)]
+
def pre_build_steps(self):
return []