Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1699)

Unified Diff: server/autotest.py

Issue 3919001: Ignore sysinfo pre/post abortions. (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: Removed typo. Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | server/test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: server/autotest.py
diff --git a/server/autotest.py b/server/autotest.py
index eb250952ba7bdd58d565ef230e54e5fd6342e684..ca4ecf6215a99854b5ea078b41e8d788a6067fc9 100644
--- a/server/autotest.py
+++ b/server/autotest.py
@@ -283,7 +283,7 @@ class BaseAutotest(installable_object.InstallableObject):
def run(self, control_file, results_dir='.', host=None, timeout=None,
tag=None, parallel_flag=False, background=False,
- client_disconnect_timeout=1800):
+ client_disconnect_timeout=1800, ignore_aborts=False):
"""
Run an autotest job on the remote machine.
@@ -301,6 +301,8 @@ class BaseAutotest(installable_object.InstallableObject):
for monitoring the client and collecting the results.
@param client_disconnect_timeout: Seconds to wait for the remote host
to come back after a reboot. [default: 30 minutes]
+ @param ignore_aborts: If the Autotest client aborts unexpectedly, don't
+ record job status as ABORT.
@raises AutotestRunError: If there is a problem executing
the control file.
@@ -313,7 +315,7 @@ class BaseAutotest(installable_object.InstallableObject):
atrun = _Run(host, results_dir, tag, parallel_flag, background)
self._do_run(control_file, results_dir, host, atrun, timeout,
- client_disconnect_timeout)
+ client_disconnect_timeout, ignore_aborts)
def _get_host_and_setup(self, host):
@@ -327,7 +329,7 @@ class BaseAutotest(installable_object.InstallableObject):
def _do_run(self, control_file, results_dir, host, atrun, timeout,
- client_disconnect_timeout):
+ client_disconnect_timeout, ignore_aborts):
try:
atrun.verify_machine()
except:
@@ -396,7 +398,8 @@ class BaseAutotest(installable_object.InstallableObject):
atrun.execute_control(
timeout=timeout,
- client_disconnect_timeout=client_disconnect_timeout)
+ client_disconnect_timeout=client_disconnect_timeout,
+ ignore_aborts=ignore_aborts)
def run_timed_test(self, test_name, results_dir='.', host=None,
@@ -660,7 +663,7 @@ class _BaseRun(object):
def execute_section(self, section, timeout, stderr_redirector,
- client_disconnect_timeout):
+ client_disconnect_timeout, ignore_aborts=False):
logging.info("Executing %s/bin/autotest %s/control phase %d",
self.autodir, self.autodir, section)
@@ -683,7 +686,8 @@ class _BaseRun(object):
err = None
# log something if the client failed AND never finished logging
- if err and not self.is_client_job_finished(last_line):
+ if (err and not self.is_client_job_finished(last_line)
+ and not ignore_aborts):
self.log_unexpected_abort(stderr_redirector)
if err:
@@ -718,7 +722,8 @@ class _BaseRun(object):
self.host.reboot_followup()
- def execute_control(self, timeout=None, client_disconnect_timeout=None):
+ def execute_control(self, timeout=None, client_disconnect_timeout=None,
+ ignore_aborts=False):
if not self.background:
collector = log_collector(self.host, self.tag, self.results_dir)
hostname = self.host.hostname
@@ -740,7 +745,8 @@ class _BaseRun(object):
section_timeout = None
boot_id = self.host.get_boot_id()
last = self.execute_section(section, section_timeout,
- logger, client_disconnect_timeout)
+ logger, client_disconnect_timeout,
+ ignore_aborts)
if self.background:
return
section += 1
« no previous file with comments | « no previous file | server/test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698