diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-29 17:25:34 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-29 17:25:34 +0000 |
commit | cb155a802bdc49cfafea1c41e0f0a92168f1da09 (patch) | |
tree | bf0fae4855c7f4458d8e959455b9d12d6cd54d9d /tools/playback_benchmark | |
parent | 9bec23957253b83955c4096903ad6293d1c6e1bb (diff) | |
download | chromium_src-cb155a802bdc49cfafea1c41e0f0a92168f1da09.zip chromium_src-cb155a802bdc49cfafea1c41e0f0a92168f1da09.tar.gz chromium_src-cb155a802bdc49cfafea1c41e0f0a92168f1da09.tar.bz2 |
Fix python scripts in src/tools/
Make sure that:
- shebang is only present for executable files
- shebang is #!/usr/bin/env python
- __main__ is only present for executable files
- file's executable bit is coherent
Also fix EOF LF to be only one.
TBR=timurrrr@chromium.org
BUG=105108
TEST=
Review URL: http://codereview.chromium.org/8678023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111960 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/playback_benchmark')
-rw-r--r-- | tools/playback_benchmark/playback_driver.py | 7 | ||||
-rw-r--r-- | tools/playback_benchmark/proxy_handler.py | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | tools/playback_benchmark/run.py | 13 |
3 files changed, 15 insertions, 12 deletions
diff --git a/tools/playback_benchmark/playback_driver.py b/tools/playback_benchmark/playback_driver.py index cf8d2a0..ef6c7b4 100644 --- a/tools/playback_benchmark/playback_driver.py +++ b/tools/playback_benchmark/playback_driver.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# -# Copyright 2010 Google Inc. All Rights Reserved. - +# Copyright (c) 2011 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. """Playback driver.""" import cgi diff --git a/tools/playback_benchmark/proxy_handler.py b/tools/playback_benchmark/proxy_handler.py index 05da078..b45f960 100644 --- a/tools/playback_benchmark/proxy_handler.py +++ b/tools/playback_benchmark/proxy_handler.py @@ -1,7 +1,6 @@ -#!/usr/bin/env python -# -# Copyright 2010 Google Inc. All Rights Reserved. - +# Copyright (c) 2011 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. """HTTP proxy request handler with SSL support. RequestHandler: Utility class for parsing HTTP requests. diff --git a/tools/playback_benchmark/run.py b/tools/playback_benchmark/run.py index 231ee84..04ed12b 100644..100755 --- a/tools/playback_benchmark/run.py +++ b/tools/playback_benchmark/run.py @@ -1,8 +1,9 @@ #!/usr/bin/env python -# -# Copyright 2010 Google Inc. All Rights Reserved. +# Copyright (c) 2011 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. -"""Script for test playback. +"""Tests playback. Prerequisites: 1. OpenSSL library - http://www.openssl.org/ @@ -13,6 +14,7 @@ python run.py -t <test_dir> """ from optparse import OptionParser +import sys import playback_driver import proxy_handler @@ -26,7 +28,7 @@ def Run(options): httpd.serve_forever() -if __name__ == '__main__': +def main(): parser = OptionParser() parser.add_option("-t", "--test-dir", dest="test_dir", help="directory containing recorded test data") @@ -37,3 +39,6 @@ if __name__ == '__main__': Run(options) + +if __name__ == '__main__': + sys.exit(main()) |