diff options
Diffstat (limited to 'tools')
-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 | 40 | ||||
-rw-r--r-- | tools/run_tests/sources_and_headers.json | 14 | ||||
-rw-r--r-- | tools/run_tests/tests.json | 30 |
6 files changed, 71 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..2da02b2662 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,31 @@ 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 = [] + if args.travis: + extra_args.extend(["/m", "/p:GenerateDebugInformation=false"]) + 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 3a94b9ee6b..629a3234e8 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" diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 11fc4951df..ad37688c92 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" ] }, { @@ -1121,8 +1137,7 @@ "ci_platforms": [ "linux", "mac", - "posix", - "windows" + "posix" ], "exclude_configs": [], "flaky": false, @@ -1131,8 +1146,7 @@ "platforms": [ "linux", "mac", - "posix", - "windows" + "posix" ] }, { |