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

Unified Diff: build/android/pylib/test_options_parser.py

Issue 10689132: [android] Upstream / sync most of build/android and build/android/pylib. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « build/android/pylib/single_test_runner.py ('k') | build/android/pylib/test_package.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/test_options_parser.py
diff --git a/build/android/pylib/test_options_parser.py b/build/android/pylib/test_options_parser.py
new file mode 100644
index 0000000000000000000000000000000000000000..4b4deec3a1b7089e1912cb00bc7abb31abbccc9e
--- /dev/null
+++ b/build/android/pylib/test_options_parser.py
@@ -0,0 +1,39 @@
+# 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.
+
+"""Parses options for the instrumentation tests."""
+
+import os
+import optparse
+
+
+def CreateTestRunnerOptionParser(usage=None, default_timeout=60):
+ """Returns a new OptionParser with arguments applicable to all tests."""
+ option_parser = optparse.OptionParser(usage=usage)
+ option_parser.add_option('-t', dest='timeout',
+ help='Timeout to wait for each test',
+ type='int',
+ default=default_timeout)
+ option_parser.add_option('-c', dest='cleanup_test_files',
+ help='Cleanup test files on the device after run',
+ action='store_true',
+ default=False)
+ option_parser.add_option('-v',
+ '--verbose',
+ dest='verbose_count',
+ default=0,
+ action='count',
+ help='Verbose level (multiple times for more)')
+ profilers = ['activitymonitor', 'chrometrace', 'dumpheap', 'smaps',
+ 'traceview']
+ option_parser.add_option('--profiler', dest='profilers', action='append',
+ choices=profilers,
+ help='Profiling tool to run during test. '
+ 'Pass multiple times to run multiple profilers. '
+ 'Available profilers: %s' % profilers)
+ option_parser.add_option('--tool',
+ dest='tool',
+ help='Run the test under a tool '
+ '(use --tool help to list them)')
+ return option_parser
« no previous file with comments | « build/android/pylib/single_test_runner.py ('k') | build/android/pylib/test_package.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698