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

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

Issue 12378048: [Android] Switch instrumentation tests to the new shard/runner paradigm. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add retries to the end of the queue instead of the beginning Created 7 years, 9 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/shard_unittest.py ('k') | build/android/pylib/gtest/dispatch.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 import logging 5 import logging
6 import os 6 import os
7 7
8 from pylib import android_commands 8 from pylib import android_commands
9 from pylib import cmd_helper 9 from pylib import cmd_helper
10 from pylib import constants 10 from pylib import constants
(...skipping 21 matching lines...) Expand all
32 32
33 test_suite_dir = os.path.join(cmd_helper.OutDirectory.get(), 33 test_suite_dir = os.path.join(cmd_helper.OutDirectory.get(),
34 options.build_type) 34 options.build_type)
35 options.test_suite = os.path.join(test_suite_dir, 35 options.test_suite = os.path.join(test_suite_dir,
36 'apks', 36 'apks',
37 constants.BROWSERTEST_SUITE_NAME + '.apk') 37 constants.BROWSERTEST_SUITE_NAME + '.apk')
38 38
39 options.test_arguments = '--single_process %s' % options.test_arguments 39 options.test_arguments = '--single_process %s' % options.test_arguments
40 40
41 # Constructs a new TestRunner with the current options. 41 # Constructs a new TestRunner with the current options.
42 def RunnerFactory(device): 42 def RunnerFactory(device, shard_index):
43 return test_runner.TestRunner( 43 return test_runner.TestRunner(
44 device, 44 device,
45 options.test_suite, 45 options.test_suite,
46 options.test_arguments, 46 options.test_arguments,
47 options.timeout, 47 options.timeout,
48 options.cleanup_test_files, 48 options.cleanup_test_files,
49 options.tool, 49 options.tool,
50 options.build_type, 50 options.build_type,
51 options.webkit, 51 options.webkit,
52 constants.BROWSERTEST_TEST_PACKAGE_NAME, 52 constants.BROWSERTEST_TEST_PACKAGE_NAME,
53 constants.BROWSERTEST_TEST_ACTIVITY_NAME, 53 constants.BROWSERTEST_TEST_ACTIVITY_NAME,
54 constants.BROWSERTEST_COMMAND_LINE_FILE) 54 constants.BROWSERTEST_COMMAND_LINE_FILE)
55 55
56 # Get tests and split them up based on the number of devices. 56 # Get tests and split them up based on the number of devices.
57 if options.gtest_filter: 57 if options.gtest_filter:
58 all_tests = [t for t in options.gtest_filter.split(':') if t] 58 all_tests = [t for t in options.gtest_filter.split(':') if t]
59 else: 59 else:
60 all_tests = gtest_dispatch.GetAllEnabledTests(RunnerFactory, 60 all_tests = gtest_dispatch.GetAllEnabledTests(RunnerFactory,
61 attached_devices) 61 attached_devices)
62 62
63 # Run tests. 63 # Run tests.
64 test_results = shard.ShardAndRunTests(RunnerFactory, attached_devices, 64 test_results = shard.ShardAndRunTests(RunnerFactory, attached_devices,
65 all_tests, options.build_type) 65 all_tests, options.build_type)
66 test_results.LogFull( 66 test_results.LogFull(
67 test_type='Unit test', 67 test_type='Unit test',
68 test_package=constants.BROWSERTEST_SUITE_NAME, 68 test_package=constants.BROWSERTEST_SUITE_NAME,
69 build_type=options.build_type, 69 build_type=options.build_type,
70 flakiness_server=options.flakiness_dashboard_server) 70 flakiness_server=options.flakiness_dashboard_server)
71 test_results.PrintAnnotation() 71 test_results.PrintAnnotation()
OLDNEW
« no previous file with comments | « build/android/pylib/base/shard_unittest.py ('k') | build/android/pylib/gtest/dispatch.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698