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

Side by Side Diff: build/android/pylib/gtest/dispatch.py

Issue 18258012: [Android] Some clean up around gtest packages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/android/pylib/base/base_test_runner.py ('k') | build/android/pylib/gtest/test_package.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) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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 """Dispatches GTests.""" 5 """Dispatches GTests."""
6 6
7 import copy 7 import copy
8 import fnmatch 8 import fnmatch
9 import glob 9 import glob
10 import logging 10 import logging
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 def GetTestsFromDevice(runner): 194 def GetTestsFromDevice(runner):
195 """Get a list of tests from a device, excluding disabled tests. 195 """Get a list of tests from a device, excluding disabled tests.
196 196
197 Args: 197 Args:
198 runner: a TestRunner. 198 runner: a TestRunner.
199 Returns: 199 Returns:
200 All non-disabled tests on the device. 200 All non-disabled tests on the device.
201 """ 201 """
202 # The executable/apk needs to be copied before we can call GetAllTests. 202 # The executable/apk needs to be copied before we can call GetAllTests.
203 runner.test_package.StripAndCopyExecutable() 203 runner.test_package.Install()
204 all_tests = runner.test_package.GetAllTests() 204 all_tests = runner.test_package.GetAllTests()
205 # Only includes tests that do not have any match in the disabled list. 205 # Only includes tests that do not have any match in the disabled list.
206 disabled_list = runner.GetDisabledTests() 206 disabled_list = runner.GetDisabledTests()
207 return filter(lambda t: not any([fnmatch.fnmatch(t, disabled_pattern) 207 return filter(lambda t: not any([fnmatch.fnmatch(t, disabled_pattern)
208 for disabled_pattern in disabled_list]), 208 for disabled_pattern in disabled_list]),
209 all_tests) 209 all_tests)
210 210
211 211
212 def GetAllEnabledTests(runner_factory, devices): 212 def GetAllEnabledTests(runner_factory, devices):
213 """Get all enabled tests. 213 """Get all enabled tests.
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 test_options.test_suite = suite_path 361 test_options.test_suite = suite_path
362 test_results, test_exit_code = _RunATestSuite(test_options, suite_name) 362 test_results, test_exit_code = _RunATestSuite(test_options, suite_name)
363 results.AddTestRunResults(test_results) 363 results.AddTestRunResults(test_results)
364 if test_exit_code and exit_code != constants.ERROR_EXIT_CODE: 364 if test_exit_code and exit_code != constants.ERROR_EXIT_CODE:
365 exit_code = test_exit_code 365 exit_code = test_exit_code
366 366
367 if options.use_xvfb: 367 if options.use_xvfb:
368 framebuffer.Stop() 368 framebuffer.Stop()
369 369
370 return (results, exit_code) 370 return (results, exit_code)
OLDNEW
« no previous file with comments | « build/android/pylib/base/base_test_runner.py ('k') | build/android/pylib/gtest/test_package.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698