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

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

Issue 16820002: [Android] Separate concepts of pushing test data and installing test apk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Nilesh's comments Created 7 years, 6 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
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
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:
85 logging.debug('Pushing files to device %s', device_id) 85 logging.debug('Pushing files to device %s', device_id)
86 test_pkg = test_package.TestPackage(options.test_apk_path, 86 test_pkg = test_package.TestPackage(options.test_apk_path,
87 options.test_apk_jar_path) 87 options.test_apk_jar_path)
88 test_files_copier = test_runner.TestRunner( 88 test_files_copier = test_runner.TestRunner(
89 options, device_id, 0, test_pkg, []) 89 options, device_id, 0, test_pkg, [])
90 test_files_copier.PushDependencies() 90 test_files_copier.InstallTestPackage()
91 if options.push_deps:
92 logging.info('Pushing data deps to device.')
93 test_files_copier.PushDataDeps()
94 else:
95 logging.warning('Skipping pushing data deps to device.')
91 96
92 # Actually run the tests. 97 # Actually run the tests.
93 if len(attached_devices) > 1 and options.wait_for_debugger: 98 if len(attached_devices) > 1 and options.wait_for_debugger:
94 logging.warning('Debugger can not be sharded, ' 99 logging.warning('Debugger can not be sharded, '
95 'using first available device') 100 'using first available device')
96 attached_devices = attached_devices[:1] 101 attached_devices = attached_devices[:1]
97 logging.debug('Running Python tests') 102 logging.debug('Running Python tests')
98 sharder = PythonTestSharder(attached_devices, available_tests, options) 103 sharder = PythonTestSharder(attached_devices, available_tests, options)
99 test_results = sharder.RunShardedTests() 104 test_results = sharder.RunShardedTests()
100 105
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 Returns: 203 Returns:
199 List of test case objects for all available test methods. 204 List of test case objects for all available test methods.
200 """ 205 """
201 if not test_root: 206 if not test_root:
202 return [] 207 return []
203 all_tests = [] 208 all_tests = []
204 test_module_list = _GetTestModules(test_root, is_official_build) 209 test_module_list = _GetTestModules(test_root, is_official_build)
205 for module in test_module_list: 210 for module in test_module_list:
206 all_tests.extend(_GetTestClassesFromModule(module)) 211 all_tests.extend(_GetTestClassesFromModule(module))
207 return all_tests 212 return all_tests
OLDNEW
« no previous file with comments | « build/android/pylib/gtest/test_runner.py ('k') | build/android/pylib/instrumentation/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698