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

Side by Side Diff: bin/au_test_harness/dev_server_wrapper.py

Issue 6698017: Remove test keys from images we test with in the test harness. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Change set Created 9 years, 9 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 | « bin/au_test_harness/cros_au_test_harness.py ('k') | bin/au_test_harness/parallel_test_job.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 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2011 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 """Module containing methods and classes to interact with a devserver instance. 5 """Module containing methods and classes to interact with a devserver instance.
6 """ 6 """
7 7
8 import os 8 import os
9 import threading 9 import threading
10 10
11 import cros_build_lib as cros_lib 11 import cros_build_lib as cros_lib
12 12
13 def GenerateUpdateId(target, src, key): 13 def GenerateUpdateId(target, src, key):
14 """Returns a simple representation id of target and src paths.""" 14 """Returns a simple representation id of target and src paths."""
15 update_id = target 15 update_id = target
16 if src: update_id = '->'.join([update_id, src]) 16 if src: update_id = '->'.join([src, update_id])
17 if key: update_id = '+'.join([update_id, key]) 17 if key: update_id = '+'.join([update_id, key])
18 return update_id 18 return update_id
19 19
20 class DevServerWrapper(threading.Thread): 20 class DevServerWrapper(threading.Thread):
21 """A Simple wrapper around a dev server instance.""" 21 """A Simple wrapper around a dev server instance."""
22 22
23 def __init__(self, test_root): 23 def __init__(self, test_root):
24 self.proc = None 24 self.proc = None
25 self.test_root = test_root 25 self.test_root = test_root
26 threading.Thread.__init__(self) 26 threading.Thread.__init__(self)
(...skipping 18 matching lines...) Expand all
45 45
46 @classmethod 46 @classmethod
47 def GetDevServerURL(cls, port, sub_dir): 47 def GetDevServerURL(cls, port, sub_dir):
48 """Returns the dev server url for a given port and sub directory.""" 48 """Returns the dev server url for a given port and sub directory."""
49 ip_addr = cros_lib.GetIPAddress() 49 ip_addr = cros_lib.GetIPAddress()
50 if not port: port = 8080 50 if not port: port = 8080
51 url = 'http://%(ip)s:%(port)s/%(dir)s' % {'ip': ip_addr, 51 url = 'http://%(ip)s:%(port)s/%(dir)s' % {'ip': ip_addr,
52 'port': str(port), 52 'port': str(port),
53 'dir': sub_dir} 53 'dir': sub_dir}
54 return url 54 return url
OLDNEW
« no previous file with comments | « bin/au_test_harness/cros_au_test_harness.py ('k') | bin/au_test_harness/parallel_test_job.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698