aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests
diff options
context:
space:
mode:
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/build_python.sh1
-rw-r--r--tools/run_tests/configs.json8
-rwxr-xr-xtools/run_tests/pre_build_node.sh2
-rwxr-xr-xtools/run_tests/run_node.sh2
-rwxr-xr-xtools/run_tests/run_python.sh1
-rwxr-xr-xtools/run_tests/run_tests.py39
-rw-r--r--tools/run_tests/sources_and_headers.json64
11 files changed, 110 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/build_python.sh b/tools/run_tests/build_python.sh
index 79a148faf1..fe84300c7b 100755
--- a/tools/run_tests/build_python.sh
+++ b/tools/run_tests/build_python.sh
@@ -40,6 +40,7 @@ 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_USE_PRECOMPILED_BINARIES=0
if [ "$CONFIG" = "gcov" ]
then
diff --git a/tools/run_tests/configs.json b/tools/run_tests/configs.json
index a858170d87..325e9aa929 100644
--- a/tools/run_tests/configs.json
+++ b/tools/run_tests/configs.json
@@ -3,6 +3,14 @@
"config": "opt"
},
{
+ "config": "asan-trace-cmp",
+ "environ": {
+ "ASAN_OPTIONS": "detect_leaks=1:color=always",
+ "LSAN_OPTIONS": "suppressions=tools/lsan_suppressions.txt:report_objects=1"
+ },
+ "timeout_multiplier": 3
+ },
+ {
"config": "dbg"
},
{
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_python.sh b/tools/run_tests/run_python.sh
index d4b7250cbb..e3be14e7c7 100755
--- a/tools/run_tests/run_python.sh
+++ b/tools/run_tests/run_python.sh
@@ -40,6 +40,7 @@ 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_USE_PRECOMPILED_BINARIES=0
if [ "$CONFIG" = "gcov" ]
then
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index a9438045aa..71bb7b12db 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,20 @@ 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.
+ # TODO(jtattermusch): EMBED_ZLIB=true currently breaks the mac build
+ self._make_options = ['EMBED_OPENSSL=true',
+ 'CFLAGS=-m32', 'LDFLAGS=-m32']
+ else:
+ self._make_options = ['EMBED_OPENSSL=true', 'EMBED_ZLIB=true']
def test_specs(self):
with open('src/csharp/tests.json') as f:
@@ -511,23 +529,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']]
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index e1bfa8719b..d7c9839d5a 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -891,6 +891,22 @@
],
"headers": [],
"language": "c",
+ "name": "hpack_parser_fuzzer_test",
+ "src": [
+ "test/core/transport/chttp2/hpack_parser_fuzzer_test.c"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "language": "c",
"name": "hpack_parser_test",
"src": [
"test/core/transport/chttp2/hpack_parser_test.c"
@@ -923,6 +939,22 @@
],
"headers": [],
"language": "c",
+ "name": "http_fuzzer_test",
+ "src": [
+ "test/core/http/fuzzer.c"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "language": "c",
"name": "http_parser_test",
"src": [
"test/core/http/parser_test.c"
@@ -1013,6 +1045,22 @@
{
"deps": [
"gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "language": "c",
+ "name": "json_fuzzer_test",
+ "src": [
+ "test/core/json/fuzzer.c"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
"grpc"
],
"headers": [],
@@ -1544,6 +1592,22 @@
],
"headers": [],
"language": "c",
+ "name": "uri_fuzzer_test",
+ "src": [
+ "test/core/client_config/uri_fuzzer_test.c"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "language": "c",
"name": "uri_parser_test",
"src": [
"test/core/client_config/uri_parser_test.c"