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

Unified Diff: tools/sharding_supervisor/sharding_supervisor.py

Issue 10441103: Make sharding_supervisor.py run InProcessBrowserTest.Empty (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« content/test/test_launcher.cc ('K') | « content/test/test_launcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/sharding_supervisor/sharding_supervisor.py
===================================================================
--- tools/sharding_supervisor/sharding_supervisor.py (revision 139574)
+++ tools/sharding_supervisor/sharding_supervisor.py (working copy)
@@ -93,15 +93,21 @@
def RemoveGTestOutput(gtest_args):
- args = gtest_args[:]
- current_value = GetGTestOutput(args)
- if not current_value:
- return gtest_args
+ return FilterArgs(gtest_args, '--gtest_output=');
- args.remove('--gtest_output=' + current_value)
- return args
+def FilterArgs(args, arg_filter):
+ """Removes all strings in a list that don't start with |arg_filter|.
+ Returns:
+ A new, filtered list.
+ """
+ filtered_args = []
+ for arg in args:
+ if not arg.startswith(arg_filter):
+ filtered_args.append(arg)
+ return filtered_args
+
def AppendToXML(final_xml, generic_path, shard):
"""Combine the shard xml file with the final xml file."""
@@ -597,6 +603,7 @@
parser.error("You must have at least 1 run per core!")
num_runs = num_cores * options.runs_per_core
+ test = args[0]
gtest_args = ["--gtest_color=%s" % {
True: "yes", False: "no"}[options.color]] + args[1:]
@@ -623,13 +630,30 @@
if (options.runshard < 0 or options.runshard >= num_shards_to_run):
parser.error("Invalid shard number given parameters!")
shard = RunShard(
- args[0], num_shards_to_run, options.runshard, gtest_args, None, None)
+ test, num_shards_to_run, options.runshard, gtest_args, None, None)
shard.communicate()
return shard.poll()
+ # When running browser_tests, run InProcessBrowserTest.Empty with a longer
+ # timeout before running shards. This is needed to prevent timeouts on the
+ # first run tests on Windows XP. See: http://crbug.com/124260
+ if test.find("browser_tests") > -1:
+ args = [test]
+ args.extend(gtest_args)
+ args = FilterArgs(args, "--gtest_filter=");
+ args = FilterArgs(args, "--ui-test-action-max-timeout=");
+ args.append("--gtest_filter=InProcessBrowserTest.Empty");
+ args.append("--ui-test-action-max-timeout=240000");
+ result = subprocess.call(args,
+ bufsize=0,
+ universal_newlines=True)
+ # If the test fails, don't run anything else.
+ if result != 0:
+ return 1
+
# shard and run the whole test
ss = ShardingSupervisor(
- args[0], num_shards_to_run, num_runs, options.color,
+ test, num_shards_to_run, num_runs, options.color,
options.original_order, options.prefix, options.retry_percent,
options.timeout, options.total_slaves, options.slave_index, gtest_args)
return ss.ShardTest()
« content/test/test_launcher.cc ('K') | « content/test/test_launcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698