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

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

Issue 2025293002: Pull in new commits from the gtest-parallel upstream repo (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/gtest-parallel/README.webrtc ('k') | no next file » | no next file with comments »
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 3e2fdb4ba86ed73fed3778d26202cd4497f2fcb1..9b1f9eee35633f01aaae36c1c00c12ea76881267 100755
--- a/third_party/gtest-parallel/gtest-parallel
+++ b/third_party/gtest-parallel/gtest-parallel
@@ -251,6 +251,8 @@ parser.add_option('-d', '--output_dir', type='string',
help='output directory for test logs')
parser.add_option('-r', '--repeat', type='int', default=1,
help='repeat tests')
+parser.add_option('--failed', action='store_true', default=False,
+ help='run only failed and new tests')
parser.add_option('-w', '--workers', type='int',
default=multiprocessing.cpu_count(),
help='number of workers to spawn')
@@ -305,7 +307,8 @@ for test_binary in binaries:
if not line.strip():
continue
if line[0] != " ":
- test_group = line.strip()
+ # Remove comments for typed tests and strip whitespace.
+ test_group = line.split('#')[0].strip()
continue
# Remove comments for parameterized tests and strip whitespace.
line = line.split('#')[0].strip()
@@ -318,6 +321,12 @@ for test_binary in binaries:
tests.append((times.get_test_time(test_binary, test),
test_binary, test, command))
+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
+ # recent run failed.
+ tests = [x for x in tests if x[0] is None]
+
# Sort tests by falling runtime (with None, which is what we get for
# new and failing tests, being considered larger than any real
# runtime).
« no previous file with comments | « third_party/gtest-parallel/README.webrtc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698