diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-05 17:53:25 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-05 17:53:25 +0000 |
commit | 69c811e35b3155aa74c5df2ca3c1602c1755b00d (patch) | |
tree | 0d9e2be5c2977ebfb9a7992556269ec0811603e2 /tools | |
parent | b9506d62c0f861dfc3ad30a7847509316caea2ba (diff) | |
download | chromium_src-69c811e35b3155aa74c5df2ca3c1602c1755b00d.zip chromium_src-69c811e35b3155aa74c5df2ca3c1602c1755b00d.tar.gz chromium_src-69c811e35b3155aa74c5df2ca3c1602c1755b00d.tar.bz2 |
Remove read_trace.py, it's superseded by "trace_inputs.py read" command.
NOTRY=true
R=cmp@chromium.org
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10517015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140555 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/isolate/read_trace.py | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/tools/isolate/read_trace.py b/tools/isolate/read_trace.py deleted file mode 100755 index 152d2f8..0000000 --- a/tools/isolate/read_trace.py +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 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. - -"""Reads a trace. Mostly for testing.""" - -import logging -import optparse -import os -import sys - -import isolate_common -import trace_inputs - -BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -ROOT_DIR = os.path.dirname(os.path.dirname(BASE_DIR)) - - -def read_trace(logname, root_dir, cwd_dir, product_dir): - # Resolve any symlink - root_dir = os.path.realpath(root_dir) - api = trace_inputs.get_api() - _, _, _, _, simplified, _ = trace_inputs.load_trace(logname, root_dir, api) - variables = isolate_common.generate_dict(simplified, cwd_dir, product_dir) - isolate_common.pretty_print(variables, sys.stdout) - - -def main(): - """CLI frontend to validate arguments.""" - parser = optparse.OptionParser( - usage='%prog <options> [gtest]') - parser.add_option( - '-v', '--verbose', - action='count', - default=0, - help='Use up to 3 times to increase logging level') - parser.add_option( - '-c', '--cwd', - default='chrome', - help='Signal to start the process from this relative directory. When ' - 'specified, outputs the inputs files in a way compatible for ' - 'gyp processing. Should be set to the relative path containing the ' - 'gyp file, e.g. \'chrome\' or \'net\'') - parser.add_option( - '-p', '--product-dir', - default='out/Release', - help='Directory for PRODUCT_DIR. Default: %default') - parser.add_option( - '--root-dir', - default=ROOT_DIR, - help='Root directory to base everything off. Default: %default') - options, args = parser.parse_args() - - level = [logging.ERROR, logging.INFO, logging.DEBUG][min(2, options.verbose)] - logging.basicConfig( - level=level, - format='%(levelname)5s %(module)15s(%(lineno)3d):%(message)s') - - if len(args) != 1: - parser.error('Please provide the log to read') - if not options.product_dir: - parser.error('--product-dir is required') - if not options.cwd: - parser.error('--cwd is required') - - return read_trace( - args[0], - options.root_dir, - options.cwd, - options.product_dir) - - -if __name__ == '__main__': - sys.exit(main()) |