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

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

Issue 13956018: Android: Make number of test retries configurable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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.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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 attached_devices) 61 attached_devices)
62 all_tests = _FilterTests(all_enabled) 62 all_tests = _FilterTests(all_enabled)
63 63
64 # Run tests. 64 # Run tests.
65 # TODO(nileshagrawal): remove this abnormally long setup timeout once fewer 65 # TODO(nileshagrawal): remove this abnormally long setup timeout once fewer
66 # files are pushed to the devices for content_browsertests: crbug.com/138275 66 # files are pushed to the devices for content_browsertests: crbug.com/138275
67 setup_timeout = 20 * 60 # 20 minutes 67 setup_timeout = 20 * 60 # 20 minutes
68 test_results = shard.ShardAndRunTests(RunnerFactory, attached_devices, 68 test_results = shard.ShardAndRunTests(RunnerFactory, attached_devices,
69 all_tests, options.build_type, 69 all_tests, options.build_type,
70 setup_timeout=setup_timeout, 70 setup_timeout=setup_timeout,
71 test_timeout=None) 71 test_timeout=None,
72 num_retries=options.num_retries)
72 report_results.LogFull( 73 report_results.LogFull(
73 results=test_results, 74 results=test_results,
74 test_type='Unit test', 75 test_type='Unit test',
75 test_package=constants.BROWSERTEST_SUITE_NAME, 76 test_package=constants.BROWSERTEST_SUITE_NAME,
76 build_type=options.build_type, 77 build_type=options.build_type,
77 flakiness_server=options.flakiness_dashboard_server) 78 flakiness_server=options.flakiness_dashboard_server)
78 report_results.PrintAnnotation(test_results) 79 report_results.PrintAnnotation(test_results)
79 80
80 def _FilterTests(all_enabled_tests): 81 def _FilterTests(all_enabled_tests):
81 """Filters out tests and fixtures starting with PRE_ and MANUAL_.""" 82 """Filters out tests and fixtures starting with PRE_ and MANUAL_."""
82 return [t for t in all_enabled_tests if _ShouldRunOnBot(t)] 83 return [t for t in all_enabled_tests if _ShouldRunOnBot(t)]
83 84
84 def _ShouldRunOnBot(test): 85 def _ShouldRunOnBot(test):
85 fixture, case = test.split('.', 1) 86 fixture, case = test.split('.', 1)
86 if _StartsWith(fixture, case, "PRE_"): 87 if _StartsWith(fixture, case, "PRE_"):
87 return False 88 return False
88 if _StartsWith(fixture, case, "MANUAL_"): 89 if _StartsWith(fixture, case, "MANUAL_"):
89 return False 90 return False
90 return True 91 return True
91 92
92 def _StartsWith(a, b, prefix): 93 def _StartsWith(a, b, prefix):
93 return a.startswith(prefix) or b.startswith(prefix) 94 return a.startswith(prefix) or b.startswith(prefix)
OLDNEW
« no previous file with comments | « build/android/pylib/base/shard.py ('k') | build/android/pylib/gtest/dispatch.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698