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

Side by Side Diff: client/bin/site_job.py

Issue 6883035: Merge remote branch 'autotest-upstream/master' into autotest-merge (Closed) Base URL: ssh://gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 from datetime import datetime 6 from datetime import datetime
7 from autotest_lib.client.bin import boottool, utils 7 from autotest_lib.client.bin import boottool, utils
8 from autotest_lib.client.bin.job import base_client_job 8 from autotest_lib.client.bin.job import base_client_job
9 from autotest_lib.client.common_lib import error 9 from autotest_lib.client.common_lib import error
10 from autotest_lib.client.cros import cros_logging 10 from autotest_lib.client.cros import cros_logging
11 11
12 12
13 LAST_BOOT_TAG = object() 13 LAST_BOOT_TAG = object()
14 14
15 class site_job(base_client_job): 15 class site_job(base_client_job):
16 16
17 17
18 def __init__(self, *args, **kwargs): 18 def __init__(self, *args, **kwargs):
19 base_client_job.__init__(self, *args, **kwargs) 19 base_client_job.__init__(self, *args, **kwargs)
20 20
21 21
22 def _runtest(self, url, tag, args, dargs): 22 def _runtest(self, url, timeout, tag, args, dargs):
23 # this replaced base_client_job._runtest, which is called by 23 # this replaced base_client_job._runtest, which is called by
24 # base_client_job.runtest.group_func (see job.py) 24 # base_client_job.runtest.group_func (see job.py)
25 try: 25 try:
26 self.last_error = None 26 self.last_error = None
27 base_client_job._runtest(self, url, tag, args, dargs) 27 base_client_job._runtest(self, url, timeout,tag, args, dargs)
28 except error.TestBaseException, detail: 28 except error.TestBaseException, detail:
29 self.last_error = detail 29 self.last_error = detail
30 raise 30 raise
31 31
32 32
33 def run_test(self, url, *args, **dargs): 33 def run_test(self, url, *args, **dargs):
34 log_pauser = cros_logging.LogRotationPauser() 34 log_pauser = cros_logging.LogRotationPauser()
35 passed = False 35 passed = False
36 try: 36 try:
37 log_pauser.begin() 37 log_pauser.begin()
(...skipping 22 matching lines...) Expand all
60 60
61 # sync first, so that a sync during shutdown doesn't time out 61 # sync first, so that a sync during shutdown doesn't time out
62 utils.system("sync; sync", ignore_status=True) 62 utils.system("sync; sync", ignore_status=True)
63 63
64 utils.system("(sleep 5; reboot) </dev/null >/dev/null 2>&1 &") 64 utils.system("(sleep 5; reboot) </dev/null >/dev/null 2>&1 &")
65 self.quit() 65 self.quit()
66 66
67 67
68 def require_gcc(self): 68 def require_gcc(self):
69 return False 69 return False
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698