diff options
Diffstat (limited to 'tools/run_tests')
-rwxr-xr-x | tools/run_tests/build_php.sh | 3 | ||||
-rwxr-xr-x | tools/run_tests/run_interops.py | 4 | ||||
-rwxr-xr-x | tools/run_tests/run_sanity.sh | 2 | ||||
-rwxr-xr-x | tools/run_tests/run_tests.py | 42 | ||||
-rw-r--r-- | tools/run_tests/sources_and_headers.json | 50 | ||||
-rw-r--r-- | tools/run_tests/tests.json | 64 |
6 files changed, 143 insertions, 22 deletions
diff --git a/tools/run_tests/build_php.sh b/tools/run_tests/build_php.sh index 1d81779b6a..2fad09e1c4 100755 --- a/tools/run_tests/build_php.sh +++ b/tools/run_tests/build_php.sh @@ -46,3 +46,6 @@ cd ext/grpc phpize ./configure --enable-grpc=$root make + +# in some jenkins macos machine, somehow the PHP build script can't find libgrpc.dylib +export DYLD_LIBRARY_PATH=$(pwd)/libs/$config diff --git a/tools/run_tests/run_interops.py b/tools/run_tests/run_interops.py index e1d40d32c1..17083975d8 100755 --- a/tools/run_tests/run_interops.py +++ b/tools/run_tests/run_interops.py @@ -8,7 +8,9 @@ argp.add_argument('-l', '--language', args = argp.parse_args() # build job -build_job = jobset.JobSpec(cmdline=['tools/run_tests/run_interops_build.sh', '%s' % args.language], shortname='build') +build_job = jobset.JobSpec(cmdline=['tools/run_tests/run_interops_build.sh', '%s' % args.language], + shortname='build', + timeout_seconds=30*60) # test jobs, each test is a separate job to run in parallel _TESTS = ['large_unary', 'empty_unary', 'ping_pong', 'client_streaming', 'server_streaming'] diff --git a/tools/run_tests/run_sanity.sh b/tools/run_tests/run_sanity.sh index 32e25661fa..c18160a891 100755 --- a/tools/run_tests/run_sanity.sh +++ b/tools/run_tests/run_sanity.sh @@ -52,7 +52,7 @@ diff -u $submodules $want_submodules rm $submodules $want_submodules -if git ls-files cache.mk --error-unmatch &> /dev/null ; then +if [ -f cache.mk ] ; then echo "Please don't commit cache.mk" exit 1 fi diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 8e7dd06cad..8f6511b1f8 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -141,7 +141,8 @@ class CLanguage(object): if travis and target['flaky']: continue if self.platform == 'windows': - binary = 'vsprojects/test_bin/%s.exe' % (target['name']) + binary = 'vsprojects/%s/%s.exe' % ( + _WINDOWS_CONFIG[config.build_config], target['name']) else: binary = 'bins/%s/%s' % (config.build_config, target['name']) if os.path.isfile(binary): @@ -151,6 +152,9 @@ class CLanguage(object): return sorted(out) def make_targets(self): + if platform_string() == 'windows': + # don't build tools on windows just yet + return ['buildtests_%s' % self.make_target] return ['buildtests_%s' % self.make_target, 'tools_%s' % self.make_target] def build_steps(self): @@ -388,6 +392,11 @@ _LANGUAGES = { 'build': Build(), } +_WINDOWS_CONFIG = { + 'dbg': 'Debug', + 'opt': 'Release', + } + # parse command line argp = argparse.ArgumentParser(description='Run grpc tests.') argp.add_argument('-c', '--config', @@ -468,24 +477,33 @@ if len(build_configs) > 1: if platform.system() == 'Windows': def make_jobspec(cfg, targets): - return jobset.JobSpec(['make.bat', 'CONFIG=%s' % cfg] + targets, - cwd='vsprojects', shell=True, - timeout_seconds=30*60) + extra_args = [] + # better do parallel compilation + extra_args.extend(["/m"]) + # disable PDB generation: it's broken, and we don't need it during CI + extra_args.extend(["/p:GenerateDebugInformation=false", "/p:DebugInformationFormat=None"]) + return [ + jobset.JobSpec(['vsprojects\\build.bat', + 'vsprojects\\%s.sln' % target, + '/p:Configuration=%s' % _WINDOWS_CONFIG[cfg]] + + extra_args, + shell=True, timeout_seconds=90*60) + for target in targets] else: def make_jobspec(cfg, targets): - return jobset.JobSpec([os.getenv('MAKE', 'make'), - '-j', '%d' % (multiprocessing.cpu_count() + 1), - 'EXTRA_DEFINES=GRPC_TEST_SLOWDOWN_MACHINE_FACTOR=%f' % - args.slowdown, - 'CONFIG=%s' % cfg] + targets, - timeout_seconds=30*60) + return [jobset.JobSpec([os.getenv('MAKE', 'make'), + '-j', '%d' % (multiprocessing.cpu_count() + 1), + 'EXTRA_DEFINES=GRPC_TEST_SLOWDOWN_MACHINE_FACTOR=%f' % + args.slowdown, + 'CONFIG=%s' % cfg] + targets, + timeout_seconds=30*60)] make_targets = list(set(itertools.chain.from_iterable( l.make_targets() for l in languages))) build_steps = [] if make_targets: - build_steps.extend(set(make_jobspec(cfg, make_targets) - for cfg in build_configs)) + make_commands = itertools.chain.from_iterable(make_jobspec(cfg, make_targets) for cfg in build_configs) + build_steps.extend(set(make_commands)) build_steps.extend(set( jobset.JobSpec(cmdline, environ={'CONFIG': cfg}) for cfg in build_configs diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 2d2108f1c2..c3d2da3c5a 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -150,6 +150,20 @@ ], "headers": [], "language": "c", + "name": "endpoint_pair_test", + "src": [ + "test/core/iomgr/endpoint_pair_test.c" + ] + }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", "name": "fd_conservation_posix_test", "src": [ "test/core/iomgr/fd_conservation_posix_test.c" @@ -769,6 +783,20 @@ ], "headers": [], "language": "c", + "name": "lb_policies_test", + "src": [ + "test/core/client_config/lb_policies_test.c" + ] + }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", "name": "low_level_ping_pong_benchmark", "src": [ "test/core/network_benchmarks/low_level_ping_pong.c" @@ -1617,6 +1645,22 @@ "grpc", "grpc++", "grpc++_test_util", + "grpc_test_util" + ], + "headers": [], + "language": "c++", + "name": "streaming_throughput_test", + "src": [ + "test/cpp/end2end/streaming_throughput_test.cc" + ] + }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc++", + "grpc++_test_util", "grpc_test_util", "qps" ], @@ -12245,6 +12289,7 @@ "src/core/client_config/client_config.h", "src/core/client_config/connector.h", "src/core/client_config/lb_policies/pick_first.h", + "src/core/client_config/lb_policies/round_robin.h", "src/core/client_config/lb_policy.h", "src/core/client_config/lb_policy_factory.h", "src/core/client_config/lb_policy_registry.h", @@ -12392,6 +12437,8 @@ "src/core/client_config/connector.h", "src/core/client_config/lb_policies/pick_first.c", "src/core/client_config/lb_policies/pick_first.h", + "src/core/client_config/lb_policies/round_robin.c", + "src/core/client_config/lb_policies/round_robin.h", "src/core/client_config/lb_policy.c", "src/core/client_config/lb_policy.h", "src/core/client_config/lb_policy_factory.c", @@ -12731,6 +12778,7 @@ "src/core/client_config/client_config.h", "src/core/client_config/connector.h", "src/core/client_config/lb_policies/pick_first.h", + "src/core/client_config/lb_policies/round_robin.h", "src/core/client_config/lb_policy.h", "src/core/client_config/lb_policy_factory.h", "src/core/client_config/lb_policy_registry.h", @@ -12864,6 +12912,8 @@ "src/core/client_config/connector.h", "src/core/client_config/lb_policies/pick_first.c", "src/core/client_config/lb_policies/pick_first.h", + "src/core/client_config/lb_policies/round_robin.c", + "src/core/client_config/lb_policies/round_robin.h", "src/core/client_config/lb_policy.c", "src/core/client_config/lb_policy.h", "src/core/client_config/lb_policy_factory.c", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 11fc4951df..df251a2b8e 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -183,6 +183,24 @@ "ci_platforms": [ "linux", "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "endpoint_pair_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, + { + "ci_platforms": [ + "linux", + "mac", "posix" ], "exclude_configs": [], @@ -643,8 +661,7 @@ "ci_platforms": [ "linux", "mac", - "posix", - "windows" + "posix" ], "exclude_configs": [], "flaky": false, @@ -653,8 +670,7 @@ "platforms": [ "linux", "mac", - "posix", - "windows" + "posix" ] }, { @@ -863,6 +879,24 @@ "exclude_configs": [], "flaky": false, "language": "c", + "name": "lb_policies_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, + { + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", "name": "message_compress_test", "platforms": [ "linux", @@ -1121,8 +1155,7 @@ "ci_platforms": [ "linux", "mac", - "posix", - "windows" + "posix" ], "exclude_configs": [], "flaky": false, @@ -1131,8 +1164,7 @@ "platforms": [ "linux", "mac", - "posix", - "windows" + "posix" ] }, { @@ -1558,6 +1590,22 @@ "exclude_configs": [], "flaky": false, "language": "c++", + "name": "streaming_throughput_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "exclude_configs": [], + "flaky": false, + "language": "c++", "name": "sync_streaming_ping_pong_test", "platforms": [ "linux", |