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/browsertests/dispatch.py

Issue 13590002: [Android] Print the stack of deadlocked threads when sharding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: additional '*' * 80 to make frankf happy 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_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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_enabled = gtest_dispatch.GetAllEnabledTests(RunnerFactory, 60 all_enabled = gtest_dispatch.GetAllEnabledTests(RunnerFactory,
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 test_results = shard.ShardAndRunTests(RunnerFactory, attached_devices, 65 test_results = shard.ShardAndRunTests(RunnerFactory, attached_devices,
66 all_tests, options.build_type) 66 all_tests, options.build_type,
67 test_timeout=None)
67 report_results.LogFull( 68 report_results.LogFull(
68 results=test_results, 69 results=test_results,
69 test_type='Unit test', 70 test_type='Unit test',
70 test_package=constants.BROWSERTEST_SUITE_NAME, 71 test_package=constants.BROWSERTEST_SUITE_NAME,
71 build_type=options.build_type, 72 build_type=options.build_type,
72 flakiness_server=options.flakiness_dashboard_server) 73 flakiness_server=options.flakiness_dashboard_server)
73 report_results.PrintAnnotation(test_results) 74 report_results.PrintAnnotation(test_results)
74 75
75 def _FilterTests(all_enabled_tests): 76 def _FilterTests(all_enabled_tests):
76 """Filters out tests and fixtures starting with PRE_ and MANUAL_.""" 77 """Filters out tests and fixtures starting with PRE_ and MANUAL_."""
77 return [t for t in all_enabled_tests if _ShouldRunOnBot(t)] 78 return [t for t in all_enabled_tests if _ShouldRunOnBot(t)]
78 79
79 def _ShouldRunOnBot(test): 80 def _ShouldRunOnBot(test):
80 fixture, case = test.split('.', 1) 81 fixture, case = test.split('.', 1)
81 if _StartsWith(fixture, case, "PRE_"): 82 if _StartsWith(fixture, case, "PRE_"):
82 return False 83 return False
83 if _StartsWith(fixture, case, "MANUAL_"): 84 if _StartsWith(fixture, case, "MANUAL_"):
84 return False 85 return False
85 return True 86 return True
86 87
87 def _StartsWith(a, b, prefix): 88 def _StartsWith(a, b, prefix):
88 return a.startswith(prefix) or b.startswith(prefix) 89 return a.startswith(prefix) or b.startswith(prefix)
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