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

Unified Diff: third_party/WebKit/Tools/Scripts/print-stale-test-expectations-entries

Issue 2014063002: Run format-webkit on webkitpy code (without string conversion). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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
Index: third_party/WebKit/Tools/Scripts/print-stale-test-expectations-entries
diff --git a/third_party/WebKit/Tools/Scripts/print-stale-test-expectations-entries b/third_party/WebKit/Tools/Scripts/print-stale-test-expectations-entries
index 275b57d5655138755f66c6cb8128b1fb0fff9865..0ae5d9cb4a4e0da79804f66641d33da4269dbe57 100755
--- a/third_party/WebKit/Tools/Scripts/print-stale-test-expectations-entries
+++ b/third_party/WebKit/Tools/Scripts/print-stale-test-expectations-entries
@@ -46,7 +46,9 @@ from webkitpy.layout_tests.models.test_expectations import TestExpectationParser
google_code_url = 'https://www.googleapis.com/projecthosting/v2/projects/chromium/issues/%s?key=AIzaSyDgCqT1Dt5AZWLHo4QJjyMHaCjhnFacGF0'
crbug_prefix = 'crbug.com/'
+
class StaleTestPrinter(object):
+
def __init__(self, options):
self.days = options.days
self.create_csv = options.create_csv
@@ -57,7 +59,7 @@ class StaleTestPrinter(object):
response = urllib2.urlopen(url)
parsed = json.loads(response.read())
last_updated = parsed['updated']
- parsed_time = datetime.datetime.strptime(last_updated.split(".")[0]+"UTC", "%Y-%m-%dT%H:%M:%S%Z")
+ parsed_time = datetime.datetime.strptime(last_updated.split(".")[0] + "UTC", "%Y-%m-%dT%H:%M:%S%Z")
time_delta = datetime.datetime.now() - parsed_time
return time_delta.days > self.days
@@ -84,10 +86,15 @@ class StaleTestPrinter(object):
if self.create_csv:
host.filesystem.write_text_file(self.create_csv, csv_contents)
+
def main(argv):
option_parser = optparse.OptionParser()
option_parser.add_option('--days', type='int', default=90, help='Number of days to consider a bug stale.'),
- option_parser.add_option('--create-csv', type='string', default=0, help='Generate a CSV of the stale entries as well. Followed by the filename.'),
+ option_parser.add_option(
+ '--create-csv',
+ type='string',
+ default=0,
+ help='Generate a CSV of the stale entries as well. Followed by the filename.'),
options, args = option_parser.parse_args(argv)
printer = StaleTestPrinter(options)
« no previous file with comments | « third_party/WebKit/Tools/Scripts/print-json-test-results ('k') | third_party/WebKit/Tools/Scripts/print-test-ordering » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698