summaryrefslogtreecommitdiffstats
path: root/tools/sharding_supervisor
diff options
context:
space:
mode:
authormmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-28 18:51:45 +0000
committermmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-28 18:51:45 +0000
commitac4fd8fc6206594fae65d8ed81a46bf882b6c46c (patch)
tree9b182cd08e5b7ecb2a35e6837f5816ec056145f6 /tools/sharding_supervisor
parent770cc3403e2ced8b5d5f3633714444a0237c82e0 (diff)
downloadchromium_src-ac4fd8fc6206594fae65d8ed81a46bf882b6c46c.zip
chromium_src-ac4fd8fc6206594fae65d8ed81a46bf882b6c46c.tar.gz
chromium_src-ac4fd8fc6206594fae65d8ed81a46bf882b6c46c.tar.bz2
Make sharding_supervisor.py run InProcessBrowserTest.Empty
before other tests, with a longer timeout. This is aimed at fixing the issue where the first 4 tests on the XP buildbots take much longer than other tests, often timing out. BUG=124260 Review URL: https://chromiumcodereview.appspot.com/10441103 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144760 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/sharding_supervisor')
-rwxr-xr-xtools/sharding_supervisor/sharding_supervisor.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/tools/sharding_supervisor/sharding_supervisor.py b/tools/sharding_supervisor/sharding_supervisor.py
index 52aba67..019ebf8 100755
--- a/tools/sharding_supervisor/sharding_supervisor.py
+++ b/tools/sharding_supervisor/sharding_supervisor.py
@@ -597,6 +597,7 @@ def main():
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 @@ def main():
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()