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

Unified Diff: testing/legion/common_lib.py

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 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 | « testing/legion/__init__.py ('k') | testing/legion/examples/hello_world/controller_test.isolate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/legion/common_lib.py
diff --git a/testing/legion/common_lib.py b/testing/legion/common_lib.py
deleted file mode 100644
index 6e7954bbeeb2ab7877da4f6d249e030e8f79fa24..0000000000000000000000000000000000000000
--- a/testing/legion/common_lib.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Common library methods used by both coordinator and task machines."""
-
-import argparse
-import logging
-import os
-import socket
-import xmlrpclib
-
-LOGGING_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'WARN', 'ERROR']
-MY_IP = socket.gethostbyname(socket.gethostname())
-SERVER_ADDRESS = ''
-SERVER_PORT = 31710
-DEFAULT_TIMEOUT_SECS = 20 * 60 # 30 minutes
-THIS_DIR = os.path.dirname(os.path.abspath(__file__))
-SWARMING_DIR = os.path.join(THIS_DIR, '..', '..', 'tools', 'swarming_client')
-
-
-def InitLogging():
- """Initialize the logging module.
-
- Raises:
- argparse.ArgumentError if the --verbosity arg is incorrect.
- """
- parser = argparse.ArgumentParser()
- logging_action = parser.add_argument('--verbosity', default='INFO')
- args, _ = parser.parse_known_args()
- if args.verbosity not in LOGGING_LEVELS:
- raise argparse.ArgumentError(
- logging_action, 'Only levels %s supported' % str(LOGGING_LEVELS))
- logging.basicConfig(
- format='%(asctime)s %(filename)s:%(lineno)s %(levelname)s] %(message)s',
- datefmt='%H:%M:%S', level=args.verbosity)
-
-
-def ConnectToServer(server):
- """Connect to an RPC server."""
- addr = 'http://%s:%d' % (server, SERVER_PORT)
- logging.debug('Connecting to RPC server at %s', addr)
- return xmlrpclib.Server(addr, allow_none=True)
« no previous file with comments | « testing/legion/__init__.py ('k') | testing/legion/examples/hello_world/controller_test.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698