aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests
diff options
context:
space:
mode:
Diffstat (limited to 'tools/run_tests')
-rw-r--r--tools/run_tests/generated/sources_and_headers.json64
-rw-r--r--tools/run_tests/generated/tests.json46
-rwxr-xr-xtools/run_tests/performance/bq_upload_result.py14
-rwxr-xr-xtools/run_tests/performance/build_performance.sh3
-rwxr-xr-xtools/run_tests/performance/build_performance_node.sh28
-rwxr-xr-xtools/run_tests/performance/run_worker_node.sh32
-rw-r--r--tools/run_tests/performance/scenario_config.py102
-rw-r--r--tools/run_tests/python_utils/upload_test_results.py14
-rwxr-xr-xtools/run_tests/run_performance_tests.py14
-rwxr-xr-xtools/run_tests/sanity/check_bad_dependencies.sh (renamed from tools/run_tests/sanity/check_unsecure.sh)4
-rw-r--r--tools/run_tests/sanity/sanity_tests.yaml3
11 files changed, 304 insertions, 20 deletions
diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json
index a9327bded1..8ea5126fde 100644
--- a/tools/run_tests/generated/sources_and_headers.json
+++ b/tools/run_tests/generated/sources_and_headers.json
@@ -173,6 +173,23 @@
"headers": [],
"is_filegroup": false,
"language": "c",
+ "name": "buffer_list_test",
+ "src": [
+ "test/core/iomgr/buffer_list_test.cc"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "is_filegroup": false,
+ "language": "c",
"name": "channel_create_test",
"src": [
"test/core/surface/channel_create_test.cc"
@@ -1417,6 +1434,26 @@
"grpc",
"grpc_test_util"
],
+ "headers": [
+ "test/core/end2end/end2end_tests.h"
+ ],
+ "is_filegroup": false,
+ "language": "c",
+ "name": "inproc_callback_test",
+ "src": [
+ "test/core/end2end/end2end_tests.h",
+ "test/core/end2end/inproc_callback_test.cc"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc_test_util"
+ ],
"headers": [],
"is_filegroup": false,
"language": "c",
@@ -9068,6 +9105,7 @@
"alts_util",
"gpr",
"grpc_base",
+ "grpc_shadow_boringssl",
"grpc_transport_chttp2_client_insecure",
"tsi",
"tsi_interface"
@@ -9187,7 +9225,7 @@
"name": "census",
"src": [
"include/grpc/census.h",
- "src/cpp/ext/filters/census/grpc_context.cc"
+ "src/core/ext/filters/census/grpc_context.cc"
],
"third_party": false,
"type": "filegroup"
@@ -9306,6 +9344,7 @@
"src/core/lib/gprpp/fork.h",
"src/core/lib/gprpp/manual_constructor.h",
"src/core/lib/gprpp/memory.h",
+ "src/core/lib/gprpp/mutex_lock.h",
"src/core/lib/gprpp/thd.h",
"src/core/lib/profiling/timers.h"
],
@@ -9353,6 +9392,7 @@
"src/core/lib/gprpp/fork.h",
"src/core/lib/gprpp/manual_constructor.h",
"src/core/lib/gprpp/memory.h",
+ "src/core/lib/gprpp/mutex_lock.h",
"src/core/lib/gprpp/thd.h",
"src/core/lib/profiling/timers.h"
],
@@ -9465,6 +9505,7 @@
"src/core/lib/http/format_request.cc",
"src/core/lib/http/httpcli.cc",
"src/core/lib/http/parser.cc",
+ "src/core/lib/iomgr/buffer_list.cc",
"src/core/lib/iomgr/call_combiner.cc",
"src/core/lib/iomgr/combiner.cc",
"src/core/lib/iomgr/endpoint.cc",
@@ -9485,6 +9526,7 @@
"src/core/lib/iomgr/gethostname_fallback.cc",
"src/core/lib/iomgr/gethostname_host_name_max.cc",
"src/core/lib/iomgr/gethostname_sysconf.cc",
+ "src/core/lib/iomgr/internal_errqueue.cc",
"src/core/lib/iomgr/iocp_windows.cc",
"src/core/lib/iomgr/iomgr.cc",
"src/core/lib/iomgr/iomgr_custom.cc",
@@ -9644,6 +9686,7 @@
"src/core/lib/http/httpcli.h",
"src/core/lib/http/parser.h",
"src/core/lib/iomgr/block_annotate.h",
+ "src/core/lib/iomgr/buffer_list.h",
"src/core/lib/iomgr/call_combiner.h",
"src/core/lib/iomgr/closure.h",
"src/core/lib/iomgr/combiner.h",
@@ -9659,6 +9702,7 @@
"src/core/lib/iomgr/exec_ctx.h",
"src/core/lib/iomgr/executor.h",
"src/core/lib/iomgr/gethostname.h",
+ "src/core/lib/iomgr/internal_errqueue.h",
"src/core/lib/iomgr/iocp_windows.h",
"src/core/lib/iomgr/iomgr.h",
"src/core/lib/iomgr/iomgr_custom.h",
@@ -9794,6 +9838,7 @@
"src/core/lib/http/httpcli.h",
"src/core/lib/http/parser.h",
"src/core/lib/iomgr/block_annotate.h",
+ "src/core/lib/iomgr/buffer_list.h",
"src/core/lib/iomgr/call_combiner.h",
"src/core/lib/iomgr/closure.h",
"src/core/lib/iomgr/combiner.h",
@@ -9809,6 +9854,7 @@
"src/core/lib/iomgr/exec_ctx.h",
"src/core/lib/iomgr/executor.h",
"src/core/lib/iomgr/gethostname.h",
+ "src/core/lib/iomgr/internal_errqueue.h",
"src/core/lib/iomgr/iocp_windows.h",
"src/core/lib/iomgr/iomgr.h",
"src/core/lib/iomgr/iomgr_custom.h",
@@ -10355,6 +10401,7 @@
"alts_tsi",
"gpr",
"grpc_base",
+ "grpc_shadow_boringssl",
"grpc_transport_chttp2_alpn",
"tsi"
],
@@ -10471,6 +10518,20 @@
"type": "filegroup"
},
{
+ "deps": [],
+ "headers": [
+ "src/core/tsi/grpc_shadow_boringssl.h"
+ ],
+ "is_filegroup": true,
+ "language": "c",
+ "name": "grpc_shadow_boringssl",
+ "src": [
+ "src/core/tsi/grpc_shadow_boringssl.h"
+ ],
+ "third_party": false,
+ "type": "filegroup"
+ },
+ {
"deps": [
"cmdline",
"gpr",
@@ -10921,6 +10982,7 @@
"deps": [
"gpr",
"grpc_base",
+ "grpc_shadow_boringssl",
"grpc_trace",
"tsi_interface"
],
diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json
index de64097ec1..fba76d69d1 100644
--- a/tools/run_tests/generated/tests.json
+++ b/tools/run_tests/generated/tests.json
@@ -199,6 +199,26 @@
"args": [],
"benchmark": false,
"ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "exclude_iomgrs": [
+ "uv"
+ ],
+ "flaky": false,
+ "gtest": false,
+ "language": "c",
+ "name": "buffer_list_test",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": true
+ },
+ {
+ "args": [],
+ "benchmark": false,
+ "ci_platforms": [
"linux",
"mac",
"posix",
@@ -1706,6 +1726,30 @@
"posix",
"windows"
],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "exclude_iomgrs": [],
+ "flaky": false,
+ "gtest": false,
+ "language": "c",
+ "name": "inproc_callback_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [],
+ "benchmark": false,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
"cpu_cost": 0.1,
"exclude_configs": [],
"exclude_iomgrs": [],
@@ -3483,7 +3527,7 @@
"mac",
"posix"
],
- "uses_polling": true
+ "uses_polling": false
},
{
"args": [],
diff --git a/tools/run_tests/performance/bq_upload_result.py b/tools/run_tests/performance/bq_upload_result.py
index 6702587557..b442f0cf83 100755
--- a/tools/run_tests/performance/bq_upload_result.py
+++ b/tools/run_tests/performance/bq_upload_result.py
@@ -128,14 +128,16 @@ def _flatten_result_inplace(scenario_result):
def _populate_metadata_inplace(scenario_result):
"""Populates metadata based on environment variables set by Jenkins."""
- # NOTE: Grabbing the Jenkins environment variables will only work if the
- # driver is running locally on the same machine where Jenkins has started
+ # NOTE: Grabbing the Kokoro environment variables will only work if the
+ # driver is running locally on the same machine where Kokoro has started
# the job. For our setup, this is currently the case, so just assume that.
- build_number = os.getenv('BUILD_NUMBER')
- build_url = os.getenv('BUILD_URL')
- job_name = os.getenv('JOB_NAME')
- git_commit = os.getenv('GIT_COMMIT')
+ build_number = os.getenv('KOKORO_BUILD_NUMBER')
+ build_url = 'https://source.cloud.google.com/results/invocations/%s' % os.getenv(
+ 'KOKORO_BUILD_ID')
+ job_name = os.getenv('KOKORO_JOB_NAME')
+ git_commit = os.getenv('KOKORO_GIT_COMMIT')
# actual commit is the actual head of PR that is getting tested
+ # TODO(jtattermusch): unclear how to obtain on Kokoro
git_actual_commit = os.getenv('ghprbActualCommit')
utc_timestamp = str(calendar.timegm(time.gmtime()))
diff --git a/tools/run_tests/performance/build_performance.sh b/tools/run_tests/performance/build_performance.sh
index 22e0ca9fa0..35d9e90598 100755
--- a/tools/run_tests/performance/build_performance.sh
+++ b/tools/run_tests/performance/build_performance.sh
@@ -55,6 +55,9 @@ do
"csharp")
python tools/run_tests/run_tests.py -l "$language" -c "$CONFIG" --build_only -j 8 --compiler coreclr
;;
+ "node"|"node_purejs")
+ tools/run_tests/performance/build_performance_node.sh
+ ;;
*)
python tools/run_tests/run_tests.py -l "$language" -c "$CONFIG" --build_only -j 8
;;
diff --git a/tools/run_tests/performance/build_performance_node.sh b/tools/run_tests/performance/build_performance_node.sh
new file mode 100755
index 0000000000..12e0872264
--- /dev/null
+++ b/tools/run_tests/performance/build_performance_node.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+# Copyright 2018 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set +ex
+
+. "$HOME/.nvm/nvm.sh"
+
+nvm install 10
+
+set -ex
+
+cd "$(dirname "$0")/../../../../grpc-node"
+
+npm install
+
+./node_modules/.bin/gulp setup
diff --git a/tools/run_tests/performance/run_worker_node.sh b/tools/run_tests/performance/run_worker_node.sh
new file mode 100755
index 0000000000..3e5dd18edb
--- /dev/null
+++ b/tools/run_tests/performance/run_worker_node.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+# Copyright 2018 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+. "$HOME/.nvm/nvm.sh"
+
+nvm use 10
+
+set -ex
+
+fixture=$1
+
+shift
+
+# Enter repo root
+cd "$(dirname "$0")/../../.."
+
+# Enter the grpc-node repo root (expected to be next to grpc repo root)
+cd ../grpc-node
+
+node -r "./test/fixtures/$fixture" test/performance/worker.js "$@"
diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py
index f05753154e..2e78bd07fb 100644
--- a/tools/run_tests/performance/scenario_config.py
+++ b/tools/run_tests/performance/scenario_config.py
@@ -1151,6 +1151,106 @@ class GoLanguage:
return 'go'
+class NodeLanguage:
+
+ def __init__(self, node_purejs=False):
+ pass
+ self.node_purejs = node_purejs
+ self.safename = str(self)
+
+ def worker_cmdline(self):
+ fixture = 'native_js' if self.node_purejs else 'native_native'
+ return [
+ 'tools/run_tests/performance/run_worker_node.sh', fixture,
+ '--benchmark_impl=grpc'
+ ]
+
+ def worker_port_offset(self):
+ if self.node_purejs:
+ return 1100
+ return 1000
+
+ def scenarios(self):
+ node_implementation = 'node_purejs' if self.node_purejs else 'node'
+ for secure in [True, False]:
+ secstr = 'secure' if secure else 'insecure'
+ smoketest_categories = ([SMOKETEST] if secure else []) + [SCALABLE]
+
+ yield _ping_pong_scenario(
+ '%s_to_node_generic_async_streaming_ping_pong_%s' %
+ (node_implementation, secstr),
+ rpc_type='STREAMING',
+ client_type='ASYNC_CLIENT',
+ server_type='ASYNC_GENERIC_SERVER',
+ server_language='node',
+ use_generic_payload=True,
+ async_server_threads=1,
+ secure=secure,
+ categories=smoketest_categories)
+
+ yield _ping_pong_scenario(
+ '%s_to_node_protobuf_async_streaming_ping_pong_%s' %
+ (node_implementation, secstr),
+ rpc_type='STREAMING',
+ client_type='ASYNC_CLIENT',
+ server_type='ASYNC_SERVER',
+ server_language='node',
+ async_server_threads=1,
+ secure=secure)
+
+ yield _ping_pong_scenario(
+ '%s_to_node_protobuf_async_unary_ping_pong_%s' %
+ (node_implementation, secstr),
+ rpc_type='UNARY',
+ client_type='ASYNC_CLIENT',
+ server_type='ASYNC_SERVER',
+ server_language='node',
+ async_server_threads=1,
+ secure=secure,
+ categories=smoketest_categories)
+
+ yield _ping_pong_scenario(
+ '%s_to_node_protobuf_async_unary_qps_unconstrained_%s' %
+ (node_implementation, secstr),
+ rpc_type='UNARY',
+ client_type='ASYNC_CLIENT',
+ server_type='ASYNC_SERVER',
+ server_language='node',
+ unconstrained_client='async',
+ secure=secure,
+ categories=smoketest_categories + [SCALABLE])
+
+ yield _ping_pong_scenario(
+ '%s_to_node_protobuf_async_streaming_qps_unconstrained_%s' %
+ (node_implementation, secstr),
+ rpc_type='STREAMING',
+ client_type='ASYNC_CLIENT',
+ server_type='ASYNC_SERVER',
+ server_language='node',
+ unconstrained_client='async',
+ secure=secure,
+ categories=[SCALABLE])
+
+ yield _ping_pong_scenario(
+ '%s_to_node_generic_async_streaming_qps_unconstrained_%s' %
+ (node_implementation, secstr),
+ rpc_type='STREAMING',
+ client_type='ASYNC_CLIENT',
+ server_type='ASYNC_GENERIC_SERVER',
+ server_language='node',
+ unconstrained_client='async',
+ use_generic_payload=True,
+ secure=secure,
+ categories=[SCALABLE])
+
+ # TODO(murgatroid99): add scenarios node vs C++
+
+ def __str__(self):
+ if self.node_purejs:
+ return 'node_purejs'
+ return 'node'
+
+
LANGUAGES = {
'c++': CXXLanguage(),
'csharp': CSharpLanguage(),
@@ -1160,4 +1260,6 @@ LANGUAGES = {
'java': JavaLanguage(),
'python': PythonLanguage(),
'go': GoLanguage(),
+ 'node': NodeLanguage(),
+ 'node_purejs': NodeLanguage(node_purejs=True)
}
diff --git a/tools/run_tests/python_utils/upload_test_results.py b/tools/run_tests/python_utils/upload_test_results.py
index cbb4c32a2a..9d99703725 100644
--- a/tools/run_tests/python_utils/upload_test_results.py
+++ b/tools/run_tests/python_utils/upload_test_results.py
@@ -68,15 +68,13 @@ _INTEROP_RESULTS_SCHEMA = [
def _get_build_metadata(test_results):
- """Add Jenkins/Kokoro build metadata to test_results based on environment
- variables set by Jenkins/Kokoro.
+ """Add Kokoro build metadata to test_results based on environment
+ variables set by Kokoro.
"""
- build_id = os.getenv('BUILD_ID') or os.getenv('KOKORO_BUILD_NUMBER')
- build_url = os.getenv('BUILD_URL')
- if os.getenv('KOKORO_BUILD_ID'):
- build_url = 'https://source.cloud.google.com/results/invocations/%s' % os.getenv(
- 'KOKORO_BUILD_ID')
- job_name = os.getenv('JOB_BASE_NAME') or os.getenv('KOKORO_JOB_NAME')
+ build_id = os.getenv('KOKORO_BUILD_NUMBER')
+ build_url = 'https://source.cloud.google.com/results/invocations/%s' % os.getenv(
+ 'KOKORO_BUILD_ID')
+ job_name = os.getenv('KOKORO_JOB_NAME')
if build_id:
test_results['build_id'] = build_id
diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py
index 9a9f74e9e5..04e706fa5b 100755
--- a/tools/run_tests/run_performance_tests.py
+++ b/tools/run_tests/run_performance_tests.py
@@ -189,11 +189,19 @@ def create_netperf_jobspec(server_host='localhost',
def archive_repo(languages):
"""Archives local version of repo including submodules."""
- cmdline = ['tar', '-cf', '../grpc.tar', '../grpc/']
+ # Directory contains symlinks that can't be correctly untarred on Windows
+ # so we just skip them as a workaround.
+ # See https://github.com/grpc/grpc/issues/16334
+ bad_symlinks_dir = '../grpc/third_party/libcxx/test/std/experimental/filesystem/Inputs/static_test_env'
+ cmdline = [
+ 'tar', '--exclude', bad_symlinks_dir, '-cf', '../grpc.tar', '../grpc/'
+ ]
if 'java' in languages:
cmdline.append('../grpc-java')
if 'go' in languages:
cmdline.append('../grpc-go')
+ if 'node' in languages or 'node_purejs' in languages:
+ cmdline.append('../grpc-node')
archive_job = jobset.JobSpec(
cmdline=cmdline, shortname='archive_repo', timeout_seconds=3 * 60)
@@ -247,9 +255,9 @@ def build_on_remote_hosts(hosts,
languages=scenario_config.LANGUAGES.keys(),
build_local=False):
"""Builds performance worker on remote hosts (and maybe also locally)."""
- build_timeout = 15 * 60
+ build_timeout = 45 * 60
# Kokoro VMs (which are local only) do not have caching, so they need more time to build
- local_build_timeout = 30 * 60
+ local_build_timeout = 60 * 60
build_jobs = []
for host in hosts:
user_at_host = '%s@%s' % (_REMOTE_HOST_USERNAME, host)
diff --git a/tools/run_tests/sanity/check_unsecure.sh b/tools/run_tests/sanity/check_bad_dependencies.sh
index cca1235479..5ae0e02c81 100755
--- a/tools/run_tests/sanity/check_unsecure.sh
+++ b/tools/run_tests/sanity/check_bad_dependencies.sh
@@ -23,5 +23,9 @@ test "$(bazel query 'somepath("//:grpc++_unsecure", "//external:libssl")' 2>/dev
test "$(bazel query 'somepath("//:grpc++_codegen_proto", "//external:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1
test "$(bazel query 'somepath("//test/cpp/microbenchmarks:helpers", "//external:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1
+# Make sure that core doesn't depend on anything in C++ library
+
+test "$(bazel query 'deps("//:grpc")' 2>/dev/null | egrep 'src/cpp|include/grpcpp' | wc -l)" -eq 0 || exit 1
+
exit 0
diff --git a/tools/run_tests/sanity/sanity_tests.yaml b/tools/run_tests/sanity/sanity_tests.yaml
index ac0d4c70e5..fd9b34a198 100644
--- a/tools/run_tests/sanity/sanity_tests.yaml
+++ b/tools/run_tests/sanity/sanity_tests.yaml
@@ -1,4 +1,5 @@
# a set of tests that are run in parallel for sanity tests
+- script: tools/run_tests/sanity/check_bad_dependencies.sh
- script: tools/run_tests/sanity/check_bazel_workspace.py
- script: tools/run_tests/sanity/check_cache_mk.sh
- script: tools/run_tests/sanity/check_owners.sh
@@ -6,7 +7,6 @@
- script: tools/run_tests/sanity/check_submodules.sh
- script: tools/run_tests/sanity/check_test_filtering.py
- script: tools/run_tests/sanity/check_tracer_sanity.py
-- script: tools/run_tests/sanity/check_unsecure.sh
- script: tools/run_tests/sanity/core_banned_functions.py
- script: tools/run_tests/sanity/core_untyped_structs.sh
- script: tools/run_tests/sanity/check_deprecated_grpc++.py
@@ -22,4 +22,5 @@
- script: tools/distrib/pylint_code.sh
- script: tools/distrib/yapf_code.sh
- script: tools/distrib/python/check_grpcio_tools.py
+- script: tools/distrib/check_shadow_boringssl_symbol_list.sh
cpu_cost: 1000