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

Unified Diff: bin/au_test_harness/dev_server_wrapper.py

Issue 6717011: Remove au_test_harness code and change symlinks to point to new location (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bin/au_test_harness/cros_test_proxy.py ('k') | bin/au_test_harness/dummy_au_worker.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/au_test_harness/dev_server_wrapper.py
diff --git a/bin/au_test_harness/dev_server_wrapper.py b/bin/au_test_harness/dev_server_wrapper.py
deleted file mode 100644
index 3ddc1b8a34bb490030cbb24272ac1fd94ed1efec..0000000000000000000000000000000000000000
--- a/bin/au_test_harness/dev_server_wrapper.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Module containing methods and classes to interact with a devserver instance.
-"""
-
-import os
-import threading
-
-import cros_build_lib as cros_lib
-
-def GenerateUpdateId(target, src, key):
- """Returns a simple representation id of target and src paths."""
- update_id = target
- if src: update_id = '->'.join([src, update_id])
- if key: update_id = '+'.join([update_id, key])
- return update_id
-
-class DevServerWrapper(threading.Thread):
- """A Simple wrapper around a dev server instance."""
-
- def __init__(self, test_root):
- self.proc = None
- self.test_root = test_root
- threading.Thread.__init__(self)
-
- def run(self):
- # Kill previous running instance of devserver if it exists.
- cros_lib.RunCommand(['sudo', 'pkill', '-f', 'devserver.py'], error_ok=True,
- print_cmd=False)
- cros_lib.RunCommand(['sudo',
- 'start_devserver',
- '--archive_dir=./static',
- '--client_prefix=ChromeOSUpdateEngine',
- '--production',
- ], enter_chroot=True, print_cmd=False,
- log_to_file=os.path.join(self.test_root,
- 'dev_server.log'))
-
- def Stop(self):
- """Kills the devserver instance."""
- cros_lib.RunCommand(['sudo', 'pkill', '-f', 'devserver.py'], error_ok=True,
- print_cmd=False)
-
- @classmethod
- def GetDevServerURL(cls, port, sub_dir):
- """Returns the dev server url for a given port and sub directory."""
- ip_addr = cros_lib.GetIPAddress()
- if not port: port = 8080
- url = 'http://%(ip)s:%(port)s/%(dir)s' % {'ip': ip_addr,
- 'port': str(port),
- 'dir': sub_dir}
- return url
« no previous file with comments | « bin/au_test_harness/cros_test_proxy.py ('k') | bin/au_test_harness/dummy_au_worker.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698