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

Side by Side Diff: build/android/pylib/host_driven/run_python_tests.py

Issue 14704006: Add option to exclude specific annotated Android instrumentation tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Yet another typo fixed Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | build/android/pylib/host_driven/test_info_collection.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Runs the Python tests (relies on using the Java test runner).""" 5 """Runs the Python tests (relies on using the Java test runner)."""
6 6
7 import logging 7 import logging
8 import os 8 import os
9 import sys 9 import sys
10 import types 10 import types
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 if options.device: 64 if options.device:
65 attached_devices = [options.device] 65 attached_devices = [options.device]
66 66
67 test_collection = TestInfoCollection() 67 test_collection = TestInfoCollection()
68 all_tests = _GetAllTests(options.python_test_root, options.official_build) 68 all_tests = _GetAllTests(options.python_test_root, options.official_build)
69 test_collection.AddTests(all_tests) 69 test_collection.AddTests(all_tests)
70 test_names = [t.qualified_name for t in all_tests] 70 test_names = [t.qualified_name for t in all_tests]
71 logging.debug('All available tests: ' + str(test_names)) 71 logging.debug('All available tests: ' + str(test_names))
72 72
73 available_tests = test_collection.GetAvailableTests( 73 available_tests = test_collection.GetAvailableTests(
74 options.annotations, options.test_filter) 74 options.annotations, options.exclude_annotations, options.test_filter)
75 75
76 if not available_tests: 76 if not available_tests:
77 logging.warning('No Python tests to run with current args.') 77 logging.warning('No Python tests to run with current args.')
78 return base_test_result.TestRunResults() 78 return base_test_result.TestRunResults()
79 79
80 test_names = [t.qualified_name for t in available_tests] 80 test_names = [t.qualified_name for t in available_tests]
81 logging.debug('Final list of tests to run: ' + str(test_names)) 81 logging.debug('Final list of tests to run: ' + str(test_names))
82 82
83 # Copy files to each device before running any tests. 83 # Copy files to each device before running any tests.
84 for device_id in attached_devices: 84 for device_id in attached_devices:
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 Returns: 198 Returns:
199 List of test case objects for all available test methods. 199 List of test case objects for all available test methods.
200 """ 200 """
201 if not test_root: 201 if not test_root:
202 return [] 202 return []
203 all_tests = [] 203 all_tests = []
204 test_module_list = _GetTestModules(test_root, is_official_build) 204 test_module_list = _GetTestModules(test_root, is_official_build)
205 for module in test_module_list: 205 for module in test_module_list:
206 all_tests.extend(_GetTestClassesFromModule(module)) 206 all_tests.extend(_GetTestClassesFromModule(module))
207 return all_tests 207 return all_tests
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/host_driven/test_info_collection.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698