Changeset 51435 in webkit
- Timestamp:
- Nov 26, 2009 11:56:51 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r51434 r51435 1 2009-11-26 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 [bzt] Kill WebKitLandingScripts 6 https://bugs.webkit.org/show_bug.cgi?id=31904 7 8 Step 5: Kill run_and_throw_if_fail. 9 10 * Scripts/modules/buildsteps.py: 11 * Scripts/modules/processutils.py: Added. 12 * Scripts/modules/webkitlandingscripts.py: 13 1 14 2009-11-26 Adam Barth <abarth@webkit.org> 2 15 -
trunk/WebKitTools/Scripts/modules/buildsteps.py
r51434 r51435 30 30 31 31 from modules.logging import log, error 32 from modules.processutils import run_and_throw_if_fail 32 33 from modules.webkitlandingscripts import WebKitLandingScripts 33 34 from modules.webkitport import WebKitPort … … 36 37 def _run_script(cls, script_name, quiet=False, port=WebKitPort): 37 38 log("Running %s" % script_name) 38 WebKitLandingScripts.run_and_throw_if_fail(port.script_path(script_name), quiet)39 run_and_throw_if_fail(port.script_path(script_name), quiet) 39 40 40 41 def prepare_changelog(self): … … 56 57 if fail_fast: 57 58 args.append("--exit-after-n-failures=1") 58 WebKitLandingScripts.run_and_throw_if_fail(args)59 run_and_throw_if_fail(args) 59 60 60 61 def ensure_builders_are_green(self, buildbot, options): … … 65 66 def build_webkit(self, quiet=False, port=WebKitPort): 66 67 log("Building WebKit") 67 WebKitLandingScripts.run_and_throw_if_fail(port.build_webkit_command(), quiet)68 run_and_throw_if_fail(port.build_webkit_command(), quiet) 68 69 69 70 def check_style(self): -
trunk/WebKitTools/Scripts/modules/commands/queues.py
r51403 r51435 49 49 from modules.multicommandtool import MultiCommandTool, Command 50 50 from modules.patchcollection import PatchCollection 51 from modules.processutils import run_and_throw_if_fail 51 52 from modules.scm import CommitMessage, detect_scm_system, ScriptError, CheckoutNeedsUpdate 52 53 from modules.statusbot import StatusBot 53 from modules.webkitlandingscripts import WebKitLandingScripts, commit_message_for_this_commit54 54 from modules.webkitport import WebKitPort 55 55 from modules.workqueue import WorkQueue, WorkQueueDelegate … … 97 97 def run_bugzilla_tool(self, args): 98 98 bugzilla_tool_args = [self.tool.path()] + args 99 WebKitLandingScripts.run_and_throw_if_fail(bugzilla_tool_args)99 run_and_throw_if_fail(bugzilla_tool_args) 100 100 101 101 def log_progress(self, patch_ids): -
trunk/WebKitTools/Scripts/modules/webkitlandingscripts.py
r51434 r51435 85 85 ] 86 86 87 @staticmethod88 def run_command_with_teed_output(args, teed_output):89 child_process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)90 91 # Use our own custom wait loop because Popen ignores a tee'd stderr/stdout.92 # FIXME: This could be improved not to flatten output to stdout.93 while True:94 output_line = child_process.stdout.readline()95 if output_line == "" and child_process.poll() != None:96 return child_process.poll()97 teed_output.write(output_line)98 99 @staticmethod100 def run_and_throw_if_fail(args, quiet=False):101 # Cache the child's output locally so it can be used for error reports.102 child_out_file = StringIO.StringIO()103 if quiet:104 dev_null = open(os.devnull, "w")105 child_stdout = tee(child_out_file, dev_null if quiet else sys.stdout)106 exit_code = WebKitLandingScripts.run_command_with_teed_output(args, child_stdout)107 if quiet:108 dev_null.close()109 110 child_output = child_out_file.getvalue()111 child_out_file.close()112 113 if exit_code:114 raise ScriptError(script_args=args, exit_code=exit_code, output=child_output)115 87 116 88
Note: See TracChangeset
for help on using the changeset viewer.