aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-01-19 13:03:46 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-01-19 13:03:46 -0800
commit590105ac53b3f211bcbfd88476590270d1499bf4 (patch)
tree0958d28c43fc8ab2c671b352ae2bba6d72316f78 /tools
parentee36bce8810fc55fb7fd8905b840faceb09b8d3c (diff)
Eliminate jobset timeouts in some circumstances
There are cases where we truly don't care how long something takes, and some external timeout will kill truly stuck processes, so let's eliminate timeouts in those cases
Diffstat (limited to 'tools')
-rwxr-xr-xtools/buildgen/generate_projects.py2
-rwxr-xr-xtools/run_tests/jobset.py4
-rwxr-xr-xtools/run_tests/run_tests.py6
3 files changed, 7 insertions, 5 deletions
diff --git a/tools/buildgen/generate_projects.py b/tools/buildgen/generate_projects.py
index 34437b9c8d..c2d71747e9 100755
--- a/tools/buildgen/generate_projects.py
+++ b/tools/buildgen/generate_projects.py
@@ -85,7 +85,7 @@ for template in templates:
os.close(tf[0])
cmd.append(test[out])
cmd.append(root + '/' + f)
- jobs.append(jobset.JobSpec(cmd, shortname=out))
+ jobs.append(jobset.JobSpec(cmd, shortname=out, timeout_seconds=None))
jobset.run(jobs, maxjobs=multiprocessing.cpu_count())
diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py
index e33433daf2..748c06dfba 100755
--- a/tools/run_tests/jobset.py
+++ b/tools/run_tests/jobset.py
@@ -273,7 +273,9 @@ class Job(object):
self.result.state = 'PASSED'
if self._bin_hash:
update_cache.finished(self._spec.identity(), self._bin_hash)
- elif self._state == _RUNNING and time.time() - self._start > self._spec.timeout_seconds:
+ elif (self._state == _RUNNING and
+ self._spec.timeout_seconds is not None and
+ time.time() - self._start > self._spec.timeout_seconds):
if self._timeout_retries < self._spec.timeout_retries:
message('TIMEOUT_FLAKE', '%s [pid=%d]' % (self._spec.shortname, self._process.pid), stdout(), do_newline=True)
self._timeout_retries += 1
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 775bec9499..ccec948987 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -764,7 +764,7 @@ if platform_string() == 'windows':
_windows_toolset_option(args.compiler),
_windows_arch_option(args.arch)] +
extra_args,
- shell=True, timeout_seconds=90*60)
+ shell=True, timeout_seconds=None)
for target in targets]
else:
def make_jobspec(cfg, targets, makefile='Makefile'):
@@ -776,7 +776,7 @@ else:
'CONFIG=%s' % cfg] +
([] if not args.travis else ['JENKINS_BUILD=1']) +
targets,
- timeout_seconds=30*60)]
+ timeout_seconds=None)]
else:
return []
make_targets = {}
@@ -801,7 +801,7 @@ if make_targets:
make_commands = itertools.chain.from_iterable(make_jobspec(cfg, list(targets), makefile) for cfg in build_configs for (makefile, targets) in make_targets.iteritems())
build_steps.extend(set(make_commands))
build_steps.extend(set(
- jobset.JobSpec(cmdline, environ=build_step_environ(cfg), timeout_seconds=10*60)
+ jobset.JobSpec(cmdline, environ=build_step_environ(cfg), timeout_seconds=None)
for cfg in build_configs
for l in languages
for cmdline in l.build_steps()))