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

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

Issue 1595019: Merge remote branch 'origin/upstream' into tempbranch (Closed)
Patch Set: Created 10 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
« no previous file with comments | « client/bin/base_partition.py ('k') | client/bin/kernel.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 import os, logging, ConfigParser 1 import os, logging, ConfigParser
2 from autotest_lib.client.common_lib import autotemp, base_packages, error 2 from autotest_lib.client.common_lib import autotemp, base_packages, error
3 from autotest_lib.client.common_lib import global_config 3 from autotest_lib.client.common_lib import global_config
4 from autotest_lib.client.bin import harness 4 from autotest_lib.client.bin import harness
5 5
6 6
7 class harness_autoserv(harness.harness): 7 class harness_autoserv(harness.harness):
8 """ 8 """
9 The server harness for running from autoserv 9 The server harness for running from autoserv
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 self._send_and_wait('AUTOTEST_FETCH_PACKAGE', pkg_name, dest_path) 92 self._send_and_wait('AUTOTEST_FETCH_PACKAGE', pkg_name, dest_path)
93 93
94 94
95 class AutoservFetcher(base_packages.RepositoryFetcher): 95 class AutoservFetcher(base_packages.RepositoryFetcher):
96 def __init__(self, package_manager, job_harness): 96 def __init__(self, package_manager, job_harness):
97 self.url = "autoserv://" 97 self.url = "autoserv://"
98 self.job_harness = job_harness 98 self.job_harness = job_harness
99 99
100 100
101 def fetch_pkg_file(self, filename, dest_path): 101 def fetch_pkg_file(self, filename, dest_path):
102 if os.path.exists(dest_path):
103 os.remove(dest_path)
102 logging.info('Fetching %s from autoserv to %s', filename, dest_path) 104 logging.info('Fetching %s from autoserv to %s', filename, dest_path)
103 self.job_harness.fetch_package(filename, dest_path) 105 self.job_harness.fetch_package(filename, dest_path)
104 if os.path.exists(dest_path): 106 if os.path.exists(dest_path):
105 logging.debug('Successfully fetched %s from autoserv', filename) 107 logging.debug('Successfully fetched %s from autoserv', filename)
106 else: 108 else:
107 raise error.PackageFetchError('%s not fetched from autoserv' 109 raise error.PackageFetchError('%s not fetched from autoserv'
108 % filename) 110 % filename)
OLDNEW
« no previous file with comments | « client/bin/base_partition.py ('k') | client/bin/kernel.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698