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

Unified Diff: tools/heapcheck/chrome_tests.py

Issue 8678023: Fix python scripts in src/tools/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes Created 9 years, 1 month 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 | « tools/heapcheck/PRESUBMIT.py ('k') | tools/heapcheck/heapcheck_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/heapcheck/chrome_tests.py
diff --git a/tools/heapcheck/chrome_tests.py b/tools/heapcheck/chrome_tests.py
index e4cadd2ccff599f041b8ac2c1b15472881082a52..f01231d3175b6ab4217be4ed02847a75c8a8621a 100755
--- a/tools/heapcheck/chrome_tests.py
+++ b/tools/heapcheck/chrome_tests.py
@@ -1,5 +1,4 @@
-#!/usr/bin/python
-
+#!/usr/bin/env python
# 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.
@@ -417,7 +416,11 @@ class ChromeTests(object):
# summary list for long, but will be useful for someone reviewing this bot.
return ret
-def _main(_):
+
+def main():
+ if not sys.platform.startswith('linux'):
+ logging.error("Heap checking works only on Linux at the moment.")
+ return 1
parser = optparse.OptionParser("usage: %prog -b <dir> -t <test> "
"[-t <test> ...]")
parser.disable_interspersed_args()
@@ -457,9 +460,4 @@ def _main(_):
if __name__ == "__main__":
- if sys.platform.startswith('linux'):
- ret = _main(sys.argv)
- else:
- logging.error("Heap checking works only on Linux at the moment.")
- ret = 1
- sys.exit(ret)
+ sys.exit(main())
« no previous file with comments | « tools/heapcheck/PRESUBMIT.py ('k') | tools/heapcheck/heapcheck_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698