aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-03-30 08:06:31 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-03-30 08:06:31 -0700
commit56f26a59911dce75c5cb10e01710c58ef3a3d067 (patch)
tree9eedf751715ff1c247372203bc47c68139d611b4 /tools/run_tests
parent92e0f335bd817bd808c2373fa9bca5b91b9d3a65 (diff)
parent6771361fada605596428e7ce332ef28277323d2e (diff)
Merge branch 'optionalize_roundrobin' into optionalize_census
Diffstat (limited to 'tools/run_tests')
-rwxr-xr-xtools/run_tests/build_artifact_node.sh2
-rwxr-xr-xtools/run_tests/build_artifact_python.sh13
-rwxr-xr-xtools/run_tests/build_node.sh2
-rwxr-xr-xtools/run_tests/build_package_node.sh2
-rwxr-xr-xtools/run_tests/pre_build_node.sh2
-rwxr-xr-xtools/run_tests/run_node.sh2
-rwxr-xr-xtools/run_tests/run_tests.py38
7 files changed, 35 insertions, 26 deletions
diff --git a/tools/run_tests/build_artifact_node.sh b/tools/run_tests/build_artifact_node.sh
index 6aa4824538..ef3476a038 100755
--- a/tools/run_tests/build_artifact_node.sh
+++ b/tools/run_tests/build_artifact_node.sh
@@ -30,9 +30,9 @@
NODE_TARGET_ARCH=$1
source ~/.nvm/nvm.sh
-set -ex
nvm use 4
+set -ex
cd $(dirname $0)/../..
diff --git a/tools/run_tests/build_artifact_python.sh b/tools/run_tests/build_artifact_python.sh
index 7ba04d7546..1f23f9fade 100755
--- a/tools/run_tests/build_artifact_python.sh
+++ b/tools/run_tests/build_artifact_python.sh
@@ -35,15 +35,18 @@ cd $(dirname $0)/../..
if [ "$SKIP_PIP_INSTALL" == "" ]
then
pip install --upgrade six
- pip install --upgrade setuptools
+ # There's a bug in newer versions of setuptools (see
+ # https://bitbucket.org/pypa/setuptools/issues/503/pkg_resources_vendorpackagingrequirementsi)
+ pip install --upgrade 'setuptools==18'
pip install -rrequirements.txt
fi
+export GRPC_PYTHON_USE_CUSTOM_BDIST=0
+export GRPC_PYTHON_BUILD_WITH_CYTHON=1
+
# 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
@@ -51,15 +54,11 @@ ${SETARCH_CMD} python setup.py \
# 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
# bdist_wheel may be run unmolested.
-GRPC_PYTHON_USE_CUSTOM_BDIST=0 \
-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
diff --git a/tools/run_tests/build_node.sh b/tools/run_tests/build_node.sh
index 9c4af07185..cbe0e31d2e 100755
--- a/tools/run_tests/build_node.sh
+++ b/tools/run_tests/build_node.sh
@@ -31,9 +31,9 @@
NODE_VERSION=$1
source ~/.nvm/nvm.sh
-set -ex
nvm use $NODE_VERSION
+set -ex
CONFIG=${CONFIG:-opt}
diff --git a/tools/run_tests/build_package_node.sh b/tools/run_tests/build_package_node.sh
index aca90a3750..540c826311 100755
--- a/tools/run_tests/build_package_node.sh
+++ b/tools/run_tests/build_package_node.sh
@@ -29,9 +29,9 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
source ~/.nvm/nvm.sh
-set -ex
nvm use 4
+set -ex
cd $(dirname $0)/../..
diff --git a/tools/run_tests/pre_build_node.sh b/tools/run_tests/pre_build_node.sh
index 11f46d60fc..1f55df0b7b 100755
--- a/tools/run_tests/pre_build_node.sh
+++ b/tools/run_tests/pre_build_node.sh
@@ -31,9 +31,9 @@
NODE_VERSION=$1
source ~/.nvm/nvm.sh
-set -ex
nvm use $NODE_VERSION
+set -ex
export GRPC_CONFIG=${CONFIG:-opt}
diff --git a/tools/run_tests/run_node.sh b/tools/run_tests/run_node.sh
index d33890068d..b94dc3ec62 100755
--- a/tools/run_tests/run_node.sh
+++ b/tools/run_tests/run_node.sh
@@ -30,9 +30,9 @@
NODE_VERSION=$1
source ~/.nvm/nvm.sh
-set -ex
nvm use $NODE_VERSION
+set -ex
CONFIG=${CONFIG:-opt}
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index a9438045aa..6b84daea54 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -120,7 +120,12 @@ def get_c_tests(travis, test_lang) :
def _check_compiler(compiler, supported_compilers):
if compiler not in supported_compilers:
- raise Exception('Compiler %s not supported.' % compiler)
+ raise Exception('Compiler %s not supported (on this platform).' % compiler)
+
+
+def _check_arch(arch, supported_archs):
+ if arch not in supported_archs:
+ raise Exception('Architecture %s not supported.' % arch)
def _is_use_docker_child():
@@ -464,7 +469,19 @@ class CSharpLanguage(object):
def configure(self, config, args):
self.config = config
self.args = args
- _check_compiler(self.args.compiler, ['default'])
+ if self.platform == 'windows':
+ # Explicitly choosing between x86 and x64 arch doesn't work yet
+ _check_arch(self.args.arch, ['default'])
+ self._make_options = [_windows_toolset_option(self.args.compiler),
+ _windows_arch_option(self.args.arch)]
+ else:
+ _check_compiler(self.args.compiler, ['default'])
+ if self.platform == 'mac':
+ # On Mac, official distribution of mono is 32bit.
+ self._make_options = ['EMBED_OPENSSL=true', 'EMBED_ZLIB=true',
+ 'CFLAGS=-arch i386', 'LDFLAGS=-arch i386']
+ else:
+ self._make_options = ['EMBED_OPENSSL=true', 'EMBED_ZLIB=true']
def test_specs(self):
with open('src/csharp/tests.json') as f:
@@ -511,23 +528,16 @@ class CSharpLanguage(object):
return [['tools/run_tests/pre_build_csharp.sh']]
def make_targets(self):
- # For Windows, this target doesn't really build anything,
- # everything is build by buildall script later.
- if self.platform == 'windows':
- return []
- else:
- return ['grpc_csharp_ext']
+ return ['grpc_csharp_ext']
def make_options(self):
- if self.platform == 'mac':
- # On Mac, official distribution of mono is 32bit.
- return ['CFLAGS=-arch i386', 'LDFLAGS=-arch i386']
- else:
- return []
+ return self._make_options;
def build_steps(self):
if self.platform == 'windows':
- return [['src\\csharp\\buildall.bat']]
+ return [[_windows_build_bat(self.args.compiler),
+ 'src/csharp/Grpc.sln',
+ '/p:Configuration=%s' % _MSBUILD_CONFIG[self.config.build_config]]]
else:
return [['tools/run_tests/build_csharp.sh']]