diff options
Diffstat (limited to 'tools/run_tests')
-rw-r--r-- | tools/run_tests/artifacts/build_artifact_csharp.bat | 5 | ||||
-rw-r--r-- | tools/run_tests/artifacts/distribtest_targets.py | 1 | ||||
-rw-r--r-- | tools/run_tests/generated/sources_and_headers.json | 48 | ||||
-rw-r--r-- | tools/run_tests/generated/tests.json | 741 | ||||
-rw-r--r-- | tools/run_tests/python_utils/upload_rbe_results.py | 6 | ||||
-rw-r--r-- | tools/run_tests/python_utils/upload_test_results.py | 56 | ||||
-rwxr-xr-x | tools/run_tests/run_tests.py | 11 | ||||
-rwxr-xr-x | tools/run_tests/sanity/check_channel_arg_usage.py | 55 | ||||
-rwxr-xr-x | tools/run_tests/sanity/core_banned_functions.py | 3 |
9 files changed, 887 insertions, 39 deletions
diff --git a/tools/run_tests/artifacts/build_artifact_csharp.bat b/tools/run_tests/artifacts/build_artifact_csharp.bat index a84bc54157..ac2c92b716 100644 --- a/tools/run_tests/artifacts/build_artifact_csharp.bat +++ b/tools/run_tests/artifacts/build_artifact_csharp.bat @@ -19,11 +19,12 @@ set GRPC_SKIP_DOTNET_RESTORE=true @call tools\run_tests\helper_scripts\pre_build_csharp.bat %ARCHITECTURE% || goto :error cd cmake\build\%ARCHITECTURE% -cmake --build . --target grpc_csharp_ext --config Release +cmake --build . --target grpc_csharp_ext --config RelWithDebInfo cd ..\..\.. mkdir -p %ARTIFACTS_OUT% -copy /Y cmake\build\Win32\Release\grpc_csharp_ext.dll %ARTIFACTS_OUT% || copy /Y cmake\build\x64\Release\grpc_csharp_ext.dll %ARTIFACTS_OUT% || goto :error +copy /Y cmake\build\Win32\RelWithDebInfo\grpc_csharp_ext.dll %ARTIFACTS_OUT% || copy /Y cmake\build\x64\RelWithDebInfo\grpc_csharp_ext.dll %ARTIFACTS_OUT% || goto :error +copy /Y cmake\build\Win32\RelWithDebInfo\grpc_csharp_ext.pdb %ARTIFACTS_OUT% || copy /Y cmake\build\x64\RelWithDebInfo\grpc_csharp_ext.pdb %ARTIFACTS_OUT% || goto :error goto :EOF diff --git a/tools/run_tests/artifacts/distribtest_targets.py b/tools/run_tests/artifacts/distribtest_targets.py index 213325439e..e02f4bffcd 100644 --- a/tools/run_tests/artifacts/distribtest_targets.py +++ b/tools/run_tests/artifacts/distribtest_targets.py @@ -303,7 +303,6 @@ def targets(): CppDistribTest('linux', 'x64', 'jessie', 'cmake_as_submodule'), CppDistribTest('windows', 'x86', testcase='cmake'), CppDistribTest('windows', 'x86', testcase='cmake_as_externalproject'), - CSharpDistribTest('linux', 'x64', 'wheezy'), CSharpDistribTest('linux', 'x64', 'jessie'), CSharpDistribTest('linux', 'x86', 'jessie'), CSharpDistribTest('linux', 'x64', 'centos7'), diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 564f39b6ca..291cf87244 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -6567,6 +6567,26 @@ "gpr", "gpr_test_util", "grpc", + "grpc++", + "grpc++_test_config", + "grpc++_test_util", + "grpc_test_util" + ], + "headers": [], + "is_filegroup": false, + "language": "c++", + "name": "cancel_ares_query_test", + "src": [ + "test/cpp/naming/cancel_ares_query_test.cc" + ], + "third_party": false, + "type": "target" + }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", "grpc_test_util" ], "headers": [], @@ -8768,6 +8788,7 @@ "test/core/end2end/tests/max_message_length.cc", "test/core/end2end/tests/negative_deadline.cc", "test/core/end2end/tests/network_status_change.cc", + "test/core/end2end/tests/no_error_on_hotpath.cc", "test/core/end2end/tests/no_logging.cc", "test/core/end2end/tests/no_op.cc", "test/core/end2end/tests/payload.cc", @@ -8868,6 +8889,7 @@ "test/core/end2end/tests/max_message_length.cc", "test/core/end2end/tests/negative_deadline.cc", "test/core/end2end/tests/network_status_change.cc", + "test/core/end2end/tests/no_error_on_hotpath.cc", "test/core/end2end/tests/no_logging.cc", "test/core/end2end/tests/no_op.cc", "test/core/end2end/tests/payload.cc", @@ -9773,6 +9795,32 @@ { "deps": [ "gpr", + "gpr_base_headers", + "grpc_base_headers" + ], + "headers": [ + "src/core/lib/iomgr/cfstream_handle.h", + "src/core/lib/iomgr/endpoint_cfstream.h", + "src/core/lib/iomgr/error_cfstream.h" + ], + "is_filegroup": true, + "language": "c", + "name": "grpc_cfstream", + "src": [ + "src/core/lib/iomgr/cfstream_handle.cc", + "src/core/lib/iomgr/cfstream_handle.h", + "src/core/lib/iomgr/endpoint_cfstream.cc", + "src/core/lib/iomgr/endpoint_cfstream.h", + "src/core/lib/iomgr/error_cfstream.cc", + "src/core/lib/iomgr/error_cfstream.h", + "src/core/lib/iomgr/tcp_client_cfstream.cc" + ], + "third_party": false, + "type": "filegroup" + }, + { + "deps": [ + "gpr", "grpc_base" ], "headers": [ diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index 83d4f32eb6..48031c2fd3 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -82,7 +82,7 @@ "posix", "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 10, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -5664,6 +5664,28 @@ }, { "args": [], + "benchmark": false, + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "cancel_ares_query_test", + "platforms": [ + "linux", + "mac", + "posix" + ], + "uses_polling": true + }, + { + "args": [], "boringssl": true, "ci_platforms": [ "linux", @@ -7845,6 +7867,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -9620,6 +9665,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -11335,6 +11403,28 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -12928,6 +13018,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -14289,6 +14402,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -15912,6 +16048,25 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -17504,6 +17659,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_op" ], "ci_platforms": [ @@ -19256,6 +19434,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+workarounds_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -21064,6 +21265,30 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -22903,6 +23128,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -24711,6 +24959,30 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -27615,6 +27887,30 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -28863,6 +29159,30 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_op" ], "ci_platforms": [ @@ -30149,6 +30469,32 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [ + "msan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -31550,6 +31896,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -34475,6 +34844,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -35970,6 +36362,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "inproc_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -37193,6 +37608,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -38945,6 +39383,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -40532,6 +40993,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -41870,6 +42354,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -43474,6 +43981,25 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -45043,6 +45569,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_op" ], "ci_platforms": [ @@ -46772,6 +47321,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+workarounds_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -48556,6 +49128,30 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -50372,6 +50968,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -53188,6 +53807,30 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -54412,6 +55055,30 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_op" ], "ci_platforms": [ @@ -55672,6 +56339,32 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [ + "msan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -57000,6 +57693,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ @@ -58472,6 +59188,29 @@ }, { "args": [ + "no_error_on_hotpath" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "inproc_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "no_logging" ], "ci_platforms": [ diff --git a/tools/run_tests/python_utils/upload_rbe_results.py b/tools/run_tests/python_utils/upload_rbe_results.py index 5955b3792f..7236227f7c 100644 --- a/tools/run_tests/python_utils/upload_rbe_results.py +++ b/tools/run_tests/python_utils/upload_rbe_results.py @@ -125,7 +125,7 @@ def _get_resultstore_data(api_key, invocation_id): if __name__ == "__main__": - # Arguments are necessary if running in a non-Kokoro envrionment. + # Arguments are necessary if running in a non-Kokoro environment. argp = argparse.ArgumentParser(description='Upload RBE results.') argp.add_argument('--api_key', default='', type=str) argp.add_argument('--invocation_id', default='', type=str) @@ -175,8 +175,8 @@ if __name__ == "__main__": 'build_id': os.getenv('KOKORO_BUILD_NUMBER'), 'build_url': - 'https://sponge.corp.google.com/invocation?id=%s' % - os.getenv('KOKORO_BUILD_ID'), + 'https://source.cloud.google.com/results/invocations/%s' % + invocation_id, 'test_target': action['id']['targetId'], 'test_case': diff --git a/tools/run_tests/python_utils/upload_test_results.py b/tools/run_tests/python_utils/upload_test_results.py index 09dcd57ad4..cbb4c32a2a 100644 --- a/tools/run_tests/python_utils/upload_test_results.py +++ b/tools/run_tests/python_utils/upload_test_results.py @@ -86,6 +86,26 @@ def _get_build_metadata(test_results): test_results['job_name'] = job_name +def _insert_rows_with_retries(bq, bq_table, bq_rows): + """Insert rows to bq table. Retry on error.""" + # BigQuery sometimes fails with large uploads, so batch 1,000 rows at a time. + for i in range((len(bq_rows) / 1000) + 1): + max_retries = 3 + for attempt in range(max_retries): + if big_query_utils.insert_rows(bq, _PROJECT_ID, _DATASET_ID, + bq_table, + bq_rows[i * 1000:(i + 1) * 1000]): + break + else: + if attempt < max_retries - 1: + print('Error uploading result to bigquery, will retry.') + else: + print( + 'Error uploading result to bigquery, all attempts failed.' + ) + sys.exit(1) + + def upload_results_to_bq(resultset, bq_table, args, platform): """Upload test results to a BQ table. @@ -106,6 +126,7 @@ def upload_results_to_bq(resultset, bq_table, args, platform): partition_type=_PARTITION_TYPE, expiration_ms=_EXPIRATION_MS) + bq_rows = [] for shortname, results in six.iteritems(resultset): for result in results: test_results = {} @@ -124,23 +145,9 @@ def upload_results_to_bq(resultset, bq_table, args, platform): test_results['return_code'] = result.returncode test_results['test_name'] = shortname test_results['timestamp'] = time.strftime('%Y-%m-%d %H:%M:%S') - row = big_query_utils.make_row(str(uuid.uuid4()), test_results) - - # TODO(jtattermusch): rows are inserted one by one, very inefficient - max_retries = 3 - for attempt in range(max_retries): - if big_query_utils.insert_rows(bq, _PROJECT_ID, _DATASET_ID, - bq_table, [row]): - break - else: - if attempt < max_retries - 1: - print('Error uploading result to bigquery, will retry.') - else: - print( - 'Error uploading result to bigquery, all attempts failed.' - ) - sys.exit(1) + bq_rows.append(row) + _insert_rows_with_retries(bq, bq_table, bq_rows) def upload_interop_results_to_bq(resultset, bq_table, args): @@ -162,6 +169,7 @@ def upload_interop_results_to_bq(resultset, bq_table, args): partition_type=_PARTITION_TYPE, expiration_ms=_EXPIRATION_MS) + bq_rows = [] for shortname, results in six.iteritems(resultset): for result in results: test_results = {} @@ -175,17 +183,5 @@ def upload_interop_results_to_bq(resultset, bq_table, args): test_results['test_case'] = shortname.split(':')[3] test_results['timestamp'] = time.strftime('%Y-%m-%d %H:%M:%S') row = big_query_utils.make_row(str(uuid.uuid4()), test_results) - # TODO(jtattermusch): rows are inserted one by one, very inefficient - max_retries = 3 - for attempt in range(max_retries): - if big_query_utils.insert_rows(bq, _PROJECT_ID, _DATASET_ID, - bq_table, [row]): - break - else: - if attempt < max_retries - 1: - print('Error uploading result to bigquery, will retry.') - else: - print( - 'Error uploading result to bigquery, all attempts failed.' - ) - sys.exit(1) + bq_rows.append(row) + _insert_rows_with_retries(bq, bq_table, bq_rows) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 014fb7d33a..e04b13b24c 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -1114,6 +1114,12 @@ class ObjCLanguage(object): 'SCHEME': 'SwiftSample', 'EXAMPLE_PATH': 'src/objective-c/examples/SwiftSample' }), + self.config.job_spec( + ['test/core/iomgr/ios/CFStreamTests/run_tests.sh'], + timeout_seconds=10 * 60, + shortname='cfstream-tests', + cpu_cost=1e6, + environ=_FORCE_ENVIRON_FOR_WRAPPERS), ] def pre_build_steps(self): @@ -1126,7 +1132,10 @@ class ObjCLanguage(object): return [] def build_steps(self): - return [['src/objective-c/tests/build_tests.sh']] + return [ + ['src/objective-c/tests/build_tests.sh'], + ['test/core/iomgr/ios/CFStreamTests/build_tests.sh'], + ] def post_tests_steps(self): return [] diff --git a/tools/run_tests/sanity/check_channel_arg_usage.py b/tools/run_tests/sanity/check_channel_arg_usage.py new file mode 100755 index 0000000000..bb9f9299c1 --- /dev/null +++ b/tools/run_tests/sanity/check_channel_arg_usage.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python + +# 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. + +from __future__ import print_function + +import os +import sys + +os.chdir(os.path.join(os.path.dirname(sys.argv[0]), '../../..')) + +# set of files that are allowed to use the raw GRPC_ARG_* types +_EXCEPTIONS = set([ + 'src/core/lib/channel/channel_args.cc', + 'src/core/lib/channel/channel_args.h', +]) + +_BANNED = set([ + "GRPC_ARG_POINTER", + "GRPC_ARG_STRING", + "GRPC_ARG_INTEGER", +]) + +errors = 0 +num_files = 0 +for root, dirs, files in os.walk('src/core'): + for filename in files: + num_files += 1 + path = os.path.join(root, filename) + if path in _EXCEPTIONS: continue + with open(path) as f: + text = f.read() + for banned in _BANNED: + if banned in text: + print('Illegal use of "%s" in %s' % (banned, path)) + errors += 1 + +assert errors == 0 +# This check comes about from this issue: +# https://github.com/grpc/grpc/issues/15381 +# Basically, a change rendered this script useless and we did not realize it. +# This dumb check ensures that this type of issue doesn't occur again. +assert num_files > 300 # we definitely have more than 300 files diff --git a/tools/run_tests/sanity/core_banned_functions.py b/tools/run_tests/sanity/core_banned_functions.py index 1d3f2eba8a..8afd826453 100755 --- a/tools/run_tests/sanity/core_banned_functions.py +++ b/tools/run_tests/sanity/core_banned_functions.py @@ -30,7 +30,8 @@ BANNED_EXCEPT = { ['src/core/lib/slice/slice_buffer.cc'], 'grpc_slice_ref(': ['src/core/lib/slice/slice.cc'], 'grpc_slice_unref(': ['src/core/lib/slice/slice.cc'], - 'grpc_error_create(': ['src/core/lib/iomgr/error.cc'], + 'grpc_error_create(': + ['src/core/lib/iomgr/error.cc', 'src/core/lib/iomgr/error_cfstream.cc'], 'grpc_error_ref(': ['src/core/lib/iomgr/error.cc'], 'grpc_error_unref(': ['src/core/lib/iomgr/error.cc'], 'grpc_os_error(': ['src/core/lib/iomgr/error.cc'], |