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

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

Issue 6539001: Merge remote branch 'cros/upstream' into master. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 10 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
« no previous file with comments | « client/bin/harness_simple.py ('k') | client/bin/harness_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 """The standalone harness interface 1 """The standalone harness interface
2 2
3 The default interface as required for the standalone reboot helper. 3 The default interface as required for the standalone reboot helper.
4 """ 4 """
5 5
6 __author__ = """Copyright Andy Whitcroft 2007""" 6 __author__ = """Copyright Andy Whitcroft 2007"""
7 7
8 from autotest_lib.client.common_lib import utils 8 from autotest_lib.client.common_lib import utils
9 import os, harness, shutil, logging 9 import os, harness, shutil, logging
10 10
11 class harness_standalone(harness.harness): 11 class harness_standalone(harness.harness):
12 """The standalone server harness 12 """The standalone server harness
13 13
14 Properties: 14 Properties:
15 job 15 job
16 The job object for this job 16 The job object for this job
17 """ 17 """
18 18
19 def __init__(self, job): 19 def __init__(self, job, harness_args):
20 """ 20 """
21 job 21 job
22 The job object for this job 22 The job object for this job
23 """ 23 """
24 self.autodir = os.path.abspath(os.environ['AUTODIR']) 24 self.autodir = os.path.abspath(os.environ['AUTODIR'])
25 self.setup(job) 25 self.setup(job)
26 26
27 src = job.control_get() 27 src = job.control_get()
28 dest = os.path.join(self.autodir, 'control') 28 dest = os.path.join(self.autodir, 'control')
29 if os.path.abspath(src) != os.path.abspath(dest): 29 if os.path.abspath(src) != os.path.abspath(dest):
(...skipping 10 matching lines...) Expand all
40 initdefault = utils.system_output('grep :initdefault: /etc/inittab') 40 initdefault = utils.system_output('grep :initdefault: /etc/inittab')
41 initdefault = initdefault.split(':')[1] 41 initdefault = initdefault.split(':')[1]
42 else: 42 else:
43 initdefault = '2' 43 initdefault = '2'
44 44
45 try: 45 try:
46 utils.system('ln -sf %s /etc/init.d/autotest' % rc) 46 utils.system('ln -sf %s /etc/init.d/autotest' % rc)
47 utils.system('ln -sf %s /etc/rc%s.d/S99autotest' % (rc,initdefault)) 47 utils.system('ln -sf %s /etc/rc%s.d/S99autotest' % (rc,initdefault))
48 except: 48 except:
49 logging.warning("Linking init scripts failed") 49 logging.warning("Linking init scripts failed")
OLDNEW
« no previous file with comments | « client/bin/harness_simple.py ('k') | client/bin/harness_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698