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

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: Response to comments Created 8 years, 6 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
« no previous file with comments | « 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 144098)
+++ tools/sharding_supervisor/sharding_supervisor.py (working copy)
@@ -597,6 +597,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 +624,27 @@
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, load the test binary into memory before running
+ # any tests. This is needed to prevent loading it from disk causing the first
+ # run tests to timeout flakily. See: http://crbug.com/124260
+ if "browser_tests" in test:
+ args = [test]
+ args.extend(gtest_args)
+ args.append("--warmup")
+ result = subprocess.call(args,
+ bufsize=0,
+ universal_newlines=True)
+ # If the test fails, don't run anything else.
+ if result != 0:
+ return result
+
# 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()
« no previous file with comments | « content/test/test_launcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698