aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/run_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/run_tests/run_tests.py')
-rwxr-xr-xtools/run_tests/run_tests.py40
1 files changed, 28 insertions, 12 deletions
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