aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--build.yaml14
-rw-r--r--src/core/lib/security/credentials/oauth2/oauth2_credentials.cc2
-rw-r--r--src/core/lib/support/cpu_linux.cc6
-rw-r--r--src/cpp/client/create_channel.cc3
-rw-r--r--templates/tools/run_tests/generated/tests.json.template1
-rw-r--r--tools/debug/core/error_ref_leak.py47
-rwxr-xr-xtools/internal_ci/linux/grpc_interop_matrix.sh2
-rw-r--r--tools/run_tests/generated/tests.json202
-rwxr-xr-xtools/run_tests/run_tests.py30
9 files changed, 295 insertions, 12 deletions
diff --git a/build.yaml b/build.yaml
index 299ba47951..836e57d2d8 100644
--- a/build.yaml
+++ b/build.yaml
@@ -3543,6 +3543,7 @@ targets:
- gpr
args:
- --benchmark_min_time=0
+ benchmark: true
defaults: benchmark
platforms:
- mac
@@ -3565,6 +3566,7 @@ targets:
- gpr
args:
- --benchmark_min_time=0
+ benchmark: true
defaults: benchmark
platforms:
- mac
@@ -3587,6 +3589,7 @@ targets:
- gpr
args:
- --benchmark_min_time=0
+ benchmark: true
defaults: benchmark
platforms:
- mac
@@ -3609,6 +3612,7 @@ targets:
- gpr
args:
- --benchmark_min_time=0
+ benchmark: true
defaults: benchmark
platforms:
- mac
@@ -3630,6 +3634,7 @@ targets:
- gpr
args:
- --benchmark_min_time=0
+ benchmark: true
defaults: benchmark
platforms:
- mac
@@ -3651,6 +3656,7 @@ targets:
- gpr
args:
- --benchmark_min_time=0
+ benchmark: true
defaults: benchmark
platforms:
- mac
@@ -3672,6 +3678,7 @@ targets:
- gpr
args:
- --benchmark_min_time=4
+ benchmark: true
defaults: benchmark
platforms:
- mac
@@ -3693,6 +3700,7 @@ targets:
- gpr
args:
- --benchmark_min_time=0
+ benchmark: true
defaults: benchmark
platforms:
- mac
@@ -3717,6 +3725,7 @@ targets:
- gpr
args:
- --benchmark_min_time=0
+ benchmark: true
defaults: benchmark
excluded_poll_engines:
- poll
@@ -3744,6 +3753,7 @@ targets:
- gpr
args:
- --benchmark_min_time=0
+ benchmark: true
defaults: benchmark
excluded_poll_engines:
- poll
@@ -3770,6 +3780,7 @@ targets:
- grpc++_test_config
args:
- --benchmark_min_time=0
+ benchmark: true
defaults: benchmark
excluded_poll_engines:
- poll
@@ -3797,6 +3808,7 @@ targets:
- gpr
args:
- --benchmark_min_time=0
+ benchmark: true
defaults: benchmark
excluded_poll_engines:
- poll
@@ -3822,6 +3834,7 @@ targets:
- gpr
args:
- --benchmark_min_time=0
+ benchmark: true
defaults: benchmark
platforms:
- mac
@@ -3844,6 +3857,7 @@ targets:
- gpr
args:
- --benchmark_min_time=0
+ benchmark: true
defaults: benchmark
platforms:
- mac
diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
index f52a424e36..7867105f56 100644
--- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
+++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
@@ -262,7 +262,7 @@ static bool oauth2_token_fetcher_get_request_metadata(
grpc_mdelem cached_access_token_md = GRPC_MDNULL;
gpr_mu_lock(&c->mu);
if (!GRPC_MDISNULL(c->access_token_md) &&
- (c->token_expiration + grpc_exec_ctx_now(exec_ctx) > refresh_threshold)) {
+ (c->token_expiration - grpc_exec_ctx_now(exec_ctx) > refresh_threshold)) {
cached_access_token_md = GRPC_MDELEM_REF(c->access_token_md);
}
if (!GRPC_MDISNULL(cached_access_token_md)) {
diff --git a/src/core/lib/support/cpu_linux.cc b/src/core/lib/support/cpu_linux.cc
index 2280668442..53619caa5f 100644
--- a/src/core/lib/support/cpu_linux.cc
+++ b/src/core/lib/support/cpu_linux.cc
@@ -38,8 +38,9 @@ static int ncpus = 0;
static void init_num_cpus() {
/* This must be signed. sysconf returns -1 when the number cannot be
determined */
+ int cpu = sched_getcpu();
ncpus = (int)sysconf(_SC_NPROCESSORS_ONLN);
- if (ncpus < 1) {
+ if (ncpus < 1 || cpu < 0) {
gpr_log(GPR_ERROR, "Cannot determine number of CPUs: assuming 1");
ncpus = 1;
}
@@ -56,6 +57,9 @@ unsigned gpr_cpu_current_cpu(void) {
// sched_getcpu() is undefined on musl
return 0;
#else
+ if (gpr_cpu_num_cores() == 1) {
+ return 0;
+ }
int cpu = sched_getcpu();
if (cpu < 0) {
gpr_log(GPR_ERROR, "Error determining current CPU: %s\n", strerror(errno));
diff --git a/src/cpp/client/create_channel.cc b/src/cpp/client/create_channel.cc
index e2893c8f3c..de67281dd4 100644
--- a/src/cpp/client/create_channel.cc
+++ b/src/cpp/client/create_channel.cc
@@ -38,8 +38,7 @@ std::shared_ptr<Channel> CreateCustomChannel(
const grpc::string& target,
const std::shared_ptr<ChannelCredentials>& creds,
const ChannelArguments& args) {
- internal::GrpcLibrary
- init_lib; // We need to call init in case of a bad creds.
+ GrpcLibraryCodegen init_lib; // We need to call init in case of a bad creds.
return creds
? creds->CreateChannel(target, args)
: CreateChannelInternal("", grpc_lame_client_channel_create(
diff --git a/templates/tools/run_tests/generated/tests.json.template b/templates/tools/run_tests/generated/tests.json.template
index 0c9f0a14c4..c5dc26faa7 100644
--- a/templates/tools/run_tests/generated/tests.json.template
+++ b/templates/tools/run_tests/generated/tests.json.template
@@ -9,6 +9,7 @@
"platforms": tgt.platforms,
"ci_platforms": tgt.ci_platforms,
"gtest": tgt.gtest,
+ "benchmark": tgt.get("benchmark", False),
"exclude_configs": tgt.get("exclude_configs", []),
"exclude_iomgrs": tgt.get("exclude_iomgrs", []),
"args": tgt.get("args", []),
diff --git a/tools/debug/core/error_ref_leak.py b/tools/debug/core/error_ref_leak.py
new file mode 100644
index 0000000000..6582328a5b
--- /dev/null
+++ b/tools/debug/core/error_ref_leak.py
@@ -0,0 +1,47 @@
+#!/usr/bin/env python2.7
+#
+# Copyright 2017 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.
+
+# Reads stdin to find error_refcount log lines, and prints reference leaks
+# to stdout
+
+# usege: python error_ref_leak < logfile.txt
+
+import sys
+import re
+
+data = sys.stdin.readlines()
+
+errs = []
+for line in data:
+ # if we care about the line
+ if re.search(r'error.cc', line):
+ # str manip to cut off left part of log line
+ line = line.partition('error.cc:')[-1]
+ line = re.sub(r'\d+] ', r'', line)
+ line = line.strip().split()
+ err = line[0].strip(":")
+ if line[1] == "create":
+ assert(err not in errs)
+ errs.append(err)
+ elif line[0] == "realloc":
+ errs.remove(line[1])
+ errs.append(line[3])
+ # explicitly look for the last dereference
+ elif line[1] == "1" and line[3] == "0":
+ assert(err in errs)
+ errs.remove(err)
+
+print "leaked:", errs
diff --git a/tools/internal_ci/linux/grpc_interop_matrix.sh b/tools/internal_ci/linux/grpc_interop_matrix.sh
index 6a9c38705a..4c24c43488 100755
--- a/tools/internal_ci/linux/grpc_interop_matrix.sh
+++ b/tools/internal_ci/linux/grpc_interop_matrix.sh
@@ -22,4 +22,4 @@ cd $(dirname $0)/../../..
source tools/internal_ci/helper_scripts/prepare_build_linux_rc
-tools/interop_matrix/run_interop_matrix_tests.py --language=all --release=all --report_file=sponge_log.xml --bq_result_table interop_results $@
+tools/interop_matrix/run_interop_matrix_tests.py --language=all --release=all --allow_flakes --report_file=sponge_log.xml --bq_result_table interop_results $@
diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json
index 8c4f3f79e4..ea218c2c8f 100644
--- a/tools/run_tests/generated/tests.json
+++ b/tools/run_tests/generated/tests.json
@@ -3,6 +3,7 @@
[
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -26,6 +27,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -49,6 +51,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -72,6 +75,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -95,6 +99,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -118,6 +123,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -141,6 +147,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -166,6 +173,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -189,6 +197,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -212,6 +221,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -235,6 +245,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -258,6 +269,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -281,6 +293,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -304,6 +317,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -327,6 +341,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -350,6 +365,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -373,6 +389,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -396,6 +413,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -419,6 +437,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -442,6 +461,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -465,6 +485,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -490,6 +511,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -513,6 +535,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -538,6 +561,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -561,6 +585,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -584,6 +609,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -609,6 +635,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -632,6 +659,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux"
],
@@ -651,6 +679,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -674,6 +703,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -695,6 +725,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -718,6 +749,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -741,6 +773,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -762,6 +795,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -783,6 +817,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -806,6 +841,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -829,6 +865,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -852,6 +889,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -875,6 +913,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -898,6 +937,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -921,6 +961,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -944,6 +985,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -967,6 +1009,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -990,6 +1033,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1013,6 +1057,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1036,6 +1081,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1059,6 +1105,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1082,6 +1129,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1105,6 +1153,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1128,6 +1177,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1151,6 +1201,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1174,6 +1225,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1197,6 +1249,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1220,6 +1273,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1243,6 +1297,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1266,6 +1321,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1289,6 +1345,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1312,6 +1369,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1335,6 +1393,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1360,6 +1419,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1383,6 +1443,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1406,6 +1467,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1427,6 +1489,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1450,6 +1513,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1473,6 +1537,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux"
],
@@ -1492,6 +1557,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux"
],
@@ -1511,6 +1577,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1534,6 +1601,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1557,6 +1625,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1580,6 +1649,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1603,6 +1673,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1624,6 +1695,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux"
],
@@ -1641,6 +1713,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1664,6 +1737,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1687,6 +1761,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1710,6 +1785,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1733,6 +1809,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1756,6 +1833,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1779,6 +1857,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1802,6 +1881,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1823,6 +1903,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1846,6 +1927,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1869,6 +1951,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1892,6 +1975,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1915,6 +1999,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1938,6 +2023,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1961,6 +2047,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -1986,6 +2073,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2009,6 +2097,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2032,6 +2121,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux"
],
@@ -2051,6 +2141,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2074,6 +2165,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2097,6 +2189,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2120,6 +2213,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2143,6 +2237,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2168,6 +2263,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2193,6 +2289,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2216,6 +2313,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2239,6 +2337,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2262,6 +2361,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2285,6 +2385,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2308,6 +2409,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2331,6 +2433,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2354,6 +2457,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2377,6 +2481,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2400,6 +2505,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2421,6 +2527,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2444,6 +2551,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2467,6 +2575,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2490,6 +2599,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2513,6 +2623,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2538,6 +2649,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2561,6 +2673,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2584,6 +2697,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2609,6 +2723,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2632,6 +2747,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2655,6 +2771,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2680,6 +2797,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2705,6 +2823,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2728,6 +2847,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2751,6 +2871,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2772,6 +2893,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2795,6 +2917,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2818,6 +2941,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2841,6 +2965,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2864,6 +2989,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2887,6 +3013,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2910,6 +3037,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -2935,6 +3063,7 @@
"args": [
"--benchmark_min_time=0"
],
+ "benchmark": true,
"ci_platforms": [
"linux",
"mac",
@@ -2958,6 +3087,7 @@
"args": [
"--benchmark_min_time=0"
],
+ "benchmark": true,
"ci_platforms": [
"linux",
"mac",
@@ -2981,6 +3111,7 @@
"args": [
"--benchmark_min_time=0"
],
+ "benchmark": true,
"ci_platforms": [
"linux",
"mac",
@@ -3004,6 +3135,7 @@
"args": [
"--benchmark_min_time=0"
],
+ "benchmark": true,
"ci_platforms": [
"linux",
"mac",
@@ -3027,6 +3159,7 @@
"args": [
"--benchmark_min_time=0"
],
+ "benchmark": true,
"ci_platforms": [
"linux",
"mac",
@@ -3050,6 +3183,7 @@
"args": [
"--benchmark_min_time=0"
],
+ "benchmark": true,
"ci_platforms": [
"linux",
"mac",
@@ -3073,6 +3207,7 @@
"args": [
"--benchmark_min_time=4"
],
+ "benchmark": true,
"ci_platforms": [
"linux",
"mac",
@@ -3096,6 +3231,7 @@
"args": [
"--benchmark_min_time=0"
],
+ "benchmark": true,
"ci_platforms": [
"linux",
"mac",
@@ -3119,6 +3255,7 @@
"args": [
"--benchmark_min_time=0"
],
+ "benchmark": true,
"ci_platforms": [
"linux",
"mac",
@@ -3147,6 +3284,7 @@
"args": [
"--benchmark_min_time=0"
],
+ "benchmark": true,
"ci_platforms": [
"linux",
"mac",
@@ -3175,6 +3313,7 @@
"args": [
"--benchmark_min_time=0"
],
+ "benchmark": true,
"ci_platforms": [
"linux",
"mac",
@@ -3203,6 +3342,7 @@
"args": [
"--benchmark_min_time=0"
],
+ "benchmark": true,
"ci_platforms": [
"linux",
"mac",
@@ -3231,6 +3371,7 @@
"args": [
"--benchmark_min_time=0"
],
+ "benchmark": true,
"ci_platforms": [
"linux",
"mac",
@@ -3254,6 +3395,7 @@
"args": [
"--benchmark_min_time=0"
],
+ "benchmark": true,
"ci_platforms": [
"linux",
"mac",
@@ -3275,6 +3417,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3298,6 +3441,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3321,6 +3465,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3344,6 +3489,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3365,6 +3511,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3392,6 +3539,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3415,6 +3563,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3438,6 +3587,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3461,6 +3611,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3484,6 +3635,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3507,6 +3659,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3530,6 +3683,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3553,6 +3707,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3576,6 +3731,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3599,6 +3755,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3622,6 +3779,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3647,6 +3805,7 @@
"args": [
"--generated_file_path=gens/src/proto/grpc/testing/"
],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3670,6 +3829,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3693,6 +3853,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3716,6 +3877,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3743,6 +3905,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3770,6 +3933,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3793,6 +3957,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3816,6 +3981,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3839,6 +4005,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3860,6 +4027,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3883,6 +4051,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3906,6 +4075,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3929,6 +4099,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3952,6 +4123,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3975,6 +4147,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -3996,6 +4169,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4019,6 +4193,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4040,6 +4215,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4063,6 +4239,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4086,6 +4263,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4109,6 +4287,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4130,6 +4309,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4153,6 +4333,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4176,6 +4357,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4199,6 +4381,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4222,6 +4405,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4243,6 +4427,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4266,6 +4451,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4290,6 +4476,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4313,6 +4500,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4334,6 +4522,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4357,6 +4546,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4382,6 +4572,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4407,6 +4598,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4432,6 +4624,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4457,6 +4650,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4482,6 +4676,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4507,6 +4702,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4532,6 +4728,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4557,6 +4754,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4582,6 +4780,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4607,6 +4806,7 @@
},
{
"args": [],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4631,6 +4831,7 @@
"--test_bin_name=resolver_component_test_unsecure",
"--running_under_bazel=false"
],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
@@ -4655,6 +4856,7 @@
"--test_bin_name=resolver_component_test",
"--running_under_bazel=false"
],
+ "benchmark": false,
"ci_platforms": [
"linux",
"mac",
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 5df2311320..588784353a 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -149,10 +149,8 @@ class Config(object):
for k, v in environ.items():
actual_environ[k] = v
if not flaky and shortname and shortname in flaky_tests:
- print('Setting %s to flaky' % shortname)
flaky = True
if shortname in shortname_to_cpu:
- print('Update CPU cost for %s: %f -> %f' % (shortname, cpu_cost, shortname_to_cpu[shortname]))
cpu_cost = shortname_to_cpu[shortname]
return jobset.JobSpec(cmdline=self.tool_prefix + cmdline,
shortname=shortname,
@@ -332,11 +330,29 @@ class CLanguage(object):
if cpu_cost == 'capacity':
cpu_cost = multiprocessing.cpu_count()
if os.path.isfile(binary):
- if 'gtest' in target and target['gtest']:
- # here we parse the output of --gtest_list_tests to build up a
- # complete list of the tests contained in a binary
- # for each test, we then add a job to run, filtering for just that
- # test
+ list_test_command = None
+ filter_test_command = None
+
+ # these are the flag defined by gtest and benchmark framework to list
+ # and filter test runs. We use them to split each individual test
+ # into its own JobSpec, and thus into its own process.
+ if 'benchmark' in target and target['benchmark']:
+ with open(os.devnull, 'w') as fnull:
+ tests = subprocess.check_output([binary, '--benchmark_list_tests'],
+ stderr=fnull)
+ base = None
+ for line in tests.split('\n'):
+ test = line.strip()
+ cmdline = [binary, '--benchmark_filter=%s$' % test] + target['args']
+ out.append(self.config.job_spec(cmdline,
+ shortname='%s:%s %s' % (binary, test, shortname_ext),
+ cpu_cost=cpu_cost,
+ timeout_seconds=_DEFAULT_TIMEOUT_SECONDS * timeout_scaling,
+ environ=env))
+ elif 'gtest' in target and target['gtest']:
+ # here we parse the output of --gtest_list_tests to build up a complete
+ # list of the tests contained in a binary for each test, we then
+ # add a job to run, filtering for just that test.
with open(os.devnull, 'w') as fnull:
tests = subprocess.check_output([binary, '--gtest_list_tests'],
stderr=fnull)