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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/webkit_patch.py

Issue 2069863002: Add a webkit-patch command which gets a list of relevant try jobs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_from_try_jobs_unittest.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 Google Inc. All rights reserved. 1 # Copyright (c) 2010 Google Inc. All rights reserved.
2 # Copyright (c) 2009 Apple Inc. All rights reserved. 2 # Copyright (c) 2009 Apple Inc. All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 from webkitpy.tool.commands.queries import PrintBaselines 43 from webkitpy.tool.commands.queries import PrintBaselines
44 from webkitpy.tool.commands.queries import PrintExpectations 44 from webkitpy.tool.commands.queries import PrintExpectations
45 from webkitpy.tool.commands.rebaseline import AutoRebaseline 45 from webkitpy.tool.commands.rebaseline import AutoRebaseline
46 from webkitpy.tool.commands.rebaseline import CopyExistingBaselinesInternal 46 from webkitpy.tool.commands.rebaseline import CopyExistingBaselinesInternal
47 from webkitpy.tool.commands.rebaseline import OptimizeBaselines 47 from webkitpy.tool.commands.rebaseline import OptimizeBaselines
48 from webkitpy.tool.commands.rebaseline import Rebaseline 48 from webkitpy.tool.commands.rebaseline import Rebaseline
49 from webkitpy.tool.commands.rebaseline import RebaselineExpectations 49 from webkitpy.tool.commands.rebaseline import RebaselineExpectations
50 from webkitpy.tool.commands.rebaseline import RebaselineJson 50 from webkitpy.tool.commands.rebaseline import RebaselineJson
51 from webkitpy.tool.commands.rebaseline import RebaselineTest 51 from webkitpy.tool.commands.rebaseline import RebaselineTest
52 from webkitpy.tool.commands.rebaseline_server import RebaselineServer 52 from webkitpy.tool.commands.rebaseline_server import RebaselineServer
53 from webkitpy.tool.commands.rebaseline_from_try_jobs import RebaselineFromTryJob s
53 54
54 55
55 class WebKitPatch(MultiCommandTool, Host): 56 class WebKitPatch(MultiCommandTool, Host):
56 global_options = [ 57 global_options = [
57 make_option("-v", "--verbose", action="store_true", dest="verbose", defa ult=False, help="enable all logging"), 58 make_option("-v", "--verbose", action="store_true", dest="verbose", defa ult=False, help="enable all logging"),
58 make_option("-d", "--directory", action="append", dest="patch_directorie s", 59 make_option("-d", "--directory", action="append", dest="patch_directorie s",
59 default=[], help="Directory to look at for changed files"), 60 default=[], help="Directory to look at for changed files"),
60 ] 61 ]
61 62
62 def __init__(self, path): 63 def __init__(self, path):
63 MultiCommandTool.__init__(self, commands=[ 64 MultiCommandTool.__init__(self, commands=[
64 AnalyzeBaselines(), 65 AnalyzeBaselines(),
65 AutoRebaseline(), 66 AutoRebaseline(),
66 CommitAnnouncerCommand(), 67 CommitAnnouncerCommand(),
67 CopyExistingBaselinesInternal(), 68 CopyExistingBaselinesInternal(),
68 CrashLog(), 69 CrashLog(),
69 FlakyTests(), 70 FlakyTests(),
70 LayoutTestsServer(), 71 LayoutTestsServer(),
71 OptimizeBaselines(), 72 OptimizeBaselines(),
72 PrettyDiff(), 73 PrettyDiff(),
73 PrintBaselines(), 74 PrintBaselines(),
74 PrintExpectations(), 75 PrintExpectations(),
75 Rebaseline(), 76 Rebaseline(),
76 RebaselineExpectations(), 77 RebaselineExpectations(),
78 RebaselineFromTryJobs(),
77 RebaselineJson(), 79 RebaselineJson(),
78 RebaselineServer(), 80 RebaselineServer(),
79 RebaselineTest(), 81 RebaselineTest(),
80 ]) 82 ])
81 Host.__init__(self) 83 Host.__init__(self)
82 self._path = path 84 self._path = path
83 85
84 def path(self): 86 def path(self):
85 return self._path 87 return self._path
86 88
87 def should_show_in_main_help(self, command): 89 def should_show_in_main_help(self, command):
88 if not command.show_in_main_help: 90 if not command.show_in_main_help:
89 return False 91 return False
90 if command.requires_local_commits: 92 if command.requires_local_commits:
91 return self.scm().supports_local_commits() 93 return self.scm().supports_local_commits()
92 return True 94 return True
93 95
94 # FIXME: This may be unnecessary since we pass global options to all command s during execute() as well. 96 # FIXME: This may be unnecessary since we pass global options to all command s during execute() as well.
95 def handle_global_options(self, options): 97 def handle_global_options(self, options):
96 self.initialize_scm(options.patch_directories) 98 self.initialize_scm(options.patch_directories)
97 99
98 def should_execute_command(self, command): 100 def should_execute_command(self, command):
99 if command.requires_local_commits and not self.scm().supports_local_comm its(): 101 if command.requires_local_commits and not self.scm().supports_local_comm its():
100 failure_reason = "%s requires local commits using %s in %s." % ( 102 failure_reason = "%s requires local commits using %s in %s." % (
101 command.name, self.scm().display_name(), self.scm().checkout_roo t) 103 command.name, self.scm().display_name(), self.scm().checkout_roo t)
102 return (False, failure_reason) 104 return (False, failure_reason)
103 return (True, None) 105 return (True, None)
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_from_try_jobs_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698