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

Unified Diff: third_party/gtest-parallel/gtest-parallel

Issue 2503503002: MB: Run test with gtest-parallel on swarming. (Closed)
Patch Set: Fixed some bugs. Created 4 years, 1 month 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 | « no previous file | tools/mb/mb.py » ('j') | tools/mb/mb.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/gtest-parallel/gtest-parallel
diff --git a/third_party/gtest-parallel/gtest-parallel b/third_party/gtest-parallel/gtest-parallel
index 4e80928df659269eca75f169dbefc2f545c83025..10e7452b4dd39ca219c089b9120ec71f89388d08 100755
--- a/third_party/gtest-parallel/gtest-parallel
+++ b/third_party/gtest-parallel/gtest-parallel
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
# Copyright 2013 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -321,6 +321,11 @@ for test_binary in binaries:
tests.append((times.get_test_time(test_binary, test),
test_binary, test, command))
+shard_count = int(os.environ.get('GTEST_TOTAL_SHARDS', 1))
kjellander_webrtc 2016/11/15 15:13:36 Since this is both ugly and hard to know, could we
+shard_run = int(os.environ.get('GTEST_SHARD_INDEX', 0))
+
+tests = tests[shard_run::shard_count]
+
if options.failed:
# The first element of each entry is the runtime of the most recent
# run if it was successful, or None if the test is new or the most
« no previous file with comments | « no previous file | tools/mb/mb.py » ('j') | tools/mb/mb.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698