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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/print_layout_test_times.py

Issue 1806393002: Run yapf on files in webkit/layout_tests/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/print_layout_test_times.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/print_layout_test_times.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/print_layout_test_times.py
index 442ac84db542f3fc27897e941765d82d1561f7cc..349bca369a3666a60ff91858dbee3b8270537e8d 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/print_layout_test_times.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/print_layout_test_times.py
@@ -35,12 +35,9 @@ from webkitpy.layout_tests.port.base import Port
def main(host, argv):
parser = optparse.OptionParser(usage='%prog [times_ms.json]')
- parser.add_option('-f', '--forward', action='store', type='int',
- help='group times by first N directories of test')
- parser.add_option('-b', '--backward', action='store', type='int',
- help='group times by last N directories of test')
- parser.add_option('--fastest', action='store', type='float',
- help='print a list of tests that will take N % of the time')
+ parser.add_option('-f', '--forward', action='store', type='int', help='group times by first N directories of test')
+ parser.add_option('-b', '--backward', action='store', type='int', help='group times by last N directories of test')
+ parser.add_option('--fastest', action='store', type='float', help='print a list of tests that will take N % of the time')
epilog = """
You can print out aggregate times per directory using the -f and -b
@@ -51,6 +48,7 @@ def main(host, argv):
truncates to 'fast', -f 2 and -b 2 truncates to 'fast/forms', and -b 1
truncates to fast/forms/week . -f 0 truncates to '', which can be used
to produce a single total time for the run."""
+
parser.epilog = '\n'.join(s.lstrip() for s in epilog.splitlines())
options, args = parser.parse_args(argv)
@@ -107,7 +105,7 @@ def print_fastest(host, port, options, times):
while tests_by_time and total_so_far <= budget:
test = tests_by_time.pop(0)
test_time = times[test]
- # Make sure test time > 0 so we don't include tests that are skipped.
+ # Make sure test time > 0 so we don't include tests that are skipped.
if test_time and total_so_far + test_time <= budget:
fast_tests_by_key[key].append(test)
total_so_far += test_time

Powered by Google App Engine
This is Rietveld 408576698