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

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

Issue 1138993009: Revert of [Android] Refactor the native test wrappers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 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 """Generates test runner factory and tests for GTests.""" 5 """Generates test runner factory and tests for GTests."""
6 # pylint: disable=W0212 6 # pylint: disable=W0212
7 7
8 import logging 8 import logging
9 import os 9 import os
10 import sys 10 import sys
11 11
12 from pylib import constants 12 from pylib import constants
13 13
14 from pylib.base import base_setup 14 from pylib.base import base_setup
15 from pylib.base import base_test_result 15 from pylib.base import base_test_result
16 from pylib.base import test_dispatcher 16 from pylib.base import test_dispatcher
17 from pylib.device import device_utils 17 from pylib.device import device_utils
18 from pylib.gtest import gtest_test_instance
19 from pylib.gtest import test_package_apk 18 from pylib.gtest import test_package_apk
20 from pylib.gtest import test_package_exe 19 from pylib.gtest import test_package_exe
21 from pylib.gtest import test_runner 20 from pylib.gtest import test_runner
22 21
23 sys.path.insert(0, 22 sys.path.insert(0,
24 os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'util', 'lib', 23 os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'util', 'lib',
25 'common')) 24 'common'))
26 import unittest_util # pylint: disable=F0401 25 import unittest_util # pylint: disable=F0401
27 26
28 27
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 test_options = test_options._replace( 233 test_options = test_options._replace(
235 test_arguments=('%s --gtest_also_run_disabled_tests' % 234 test_arguments=('%s --gtest_also_run_disabled_tests' %
236 test_options.test_arguments)) 235 test_options.test_arguments))
237 else: 236 else:
238 tests = _FilterDisabledTests(tests, test_options.suite_name, 237 tests = _FilterDisabledTests(tests, test_options.suite_name,
239 bool(test_options.gtest_filter)) 238 bool(test_options.gtest_filter))
240 if test_options.gtest_filter: 239 if test_options.gtest_filter:
241 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter) 240 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter)
242 241
243 # Coalesce unit tests into a single test per device 242 # Coalesce unit tests into a single test per device
244 if test_options.suite_name not in gtest_test_instance.BROWSER_TEST_SUITES: 243 if (test_options.suite_name != 'content_browsertests' and
244 test_options.suite_name != 'components_browsertests'):
245 num_devices = len(devices) 245 num_devices = len(devices)
246 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] 246 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)]
247 tests = [t for t in tests if t] 247 tests = [t for t in tests if t]
248 248
249 return (TestRunnerFactory, tests) 249 return (TestRunnerFactory, tests)
OLDNEW
« no previous file with comments | « build/android/pylib/gtest/local_device_gtest_run.py ('k') | build/android/pylib/gtest/test_package_apk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698