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

Side by Side Diff: server/site_autotest.py

Issue 6883099: Enable autotest client package fetching based on updated image. (Closed) Base URL: ssh://gitrw.chromium.org:9222/autotest.git@master
Patch Set: 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 import os 1 import os, urlparse
2 from autotest_lib.server import installable_object 2 from autotest_lib.client.common_lib import global_config
3 from autotest_lib.server import autoserv_parser, installable_object
4
5
6 parser = autoserv_parser.autoserv_parser
7
3 8
4 class SiteAutotest(installable_object.InstallableObject): 9 class SiteAutotest(installable_object.InstallableObject):
5 10
6 def get(self, location = None): 11 def get(self, location = None):
7 if not location: 12 if not location:
8 location = os.path.join(self.serverdir, '../client') 13 location = os.path.join(self.serverdir, '../client')
9 location = os.path.abspath(location) 14 location = os.path.abspath(location)
10 installable_object.InstallableObject.get(self, location) 15 installable_object.InstallableObject.get(self, location)
11 self.got = True 16 self.got = True
12 17
13 18
19 def get_fetch_location(self):
20 c = global_config.global_config
DaleCurtis 2011/04/21 19:16:55 You only use this once, might as well combine with
21 repos = c.get_config_value("PACKAGES", 'fetch_location', type=list,
DaleCurtis 2011/04/21 19:16:55 Single quotes.
22 default=[])
23 new_repos = []
24 for repo in repos[::-1]:
25 if repo.endswith('static/archive') and parser.options.image:
26 build = '/'.join(urlparse.urlparse(
DaleCurtis 2011/04/21 19:16:55 No real reason for the urlparse. [-2:] will return
27 parser.options.image).path.split('/')[-2:])
28 repo += '/' + build + '/autotest'
DaleCurtis 2011/04/21 19:16:55 '/%s/autotest' % build
29 new_repos.append(repo)
30 repos = new_repos
DaleCurtis 2011/04/21 19:16:55 Just "return new_repos"
31 return repos
32
33
14 class _SiteRun(object): 34 class _SiteRun(object):
15 pass 35 pass
OLDNEW
« client/common_lib/site_packages.py ('K') | « client/common_lib/site_packages.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698